Note that there are some explanatory texts on larger screens.

plurals
  1. POTwitter Trends API 1.1 error "unrecognized selector sent to instance"
    primarykey
    data
    text
    <p>Take a look at my code below:</p> <pre><code>NSError *jsonParsingError; NSDictionary *jsonResults = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&amp;jsonParsingError]; NSArray *trends = jsonResults[@"trends"]; //error on this line </code></pre> <p>I encounter an "unrecognized selector sent to instance" error.</p> <p>The url i use is: <a href="https://api.twitter.com/1.1/trends/place.json?id=1" rel="nofollow noreferrer">https://api.twitter.com/1.1/trends/place.json?id=1</a></p> <p>Take a look at the jsonResults value:</p> <p><img src="https://i.stack.imgur.com/6ujAe.png" alt="Take a look at the jsonResults value"></p> <p>Compared to the TwitterSearch (a sample application) results:</p> <p><img src="https://i.stack.imgur.com/dP1ER.png" alt="Compared to the TwitterSearch results"></p> <p>here is the logged value of the jsonResults variable:</p> <pre><code>2013-08-26 11:05:44.489 TwitterTrends[48410:490b] JSON: ( { "as_of" = "2013-08-26T03:04:24Z"; "created_at" = "2013-08-26T02:51:26Z"; locations = ( { name = Worldwide; woeid = 1; } ); trends = ( { events = "&lt;null&gt;"; name = "#chupaedu"; "promoted_content" = "&lt;null&gt;"; query = "%23chupaedu"; url = "http://twitter.com/search?q=%23chupaedu"; }, { events = "&lt;null&gt;"; name = "#VMA2013NAMTV"; "promoted_content" = "&lt;null&gt;"; query = "%23VMA2013NAMTV"; url = "http://twitter.com/search?q=%23VMA2013NAMTV"; }, { events = "&lt;null&gt;"; name = "#YoConfiesoQue"; "promoted_content" = "&lt;null&gt;"; query = "%23YoConfiesoQue"; url = "http://twitter.com/search?q=%23YoConfiesoQue"; }, { events = "&lt;null&gt;"; name = "#MiObsesionPor"; "promoted_content" = "&lt;null&gt;"; query = "%23MiObsesionPor"; url = "http://twitter.com/search?q=%23MiObsesionPor"; }, { events = "&lt;null&gt;"; name = "#LasMejoresPeliculasQueViFueron"; "promoted_content" = "&lt;null&gt;"; query = "%23LasMejoresPeliculasQueViFueron"; url = "http://twitter.com/search?q=%23LasMejoresPeliculasQueViFueron"; }, { events = "&lt;null&gt;"; name = "Emile Sande"; "promoted_content" = "&lt;null&gt;"; query = "%22Emile+Sande%22"; url = "http://twitter.com/search?q=%22Emile+Sande%22"; }, { events = "&lt;null&gt;"; name = "Daniel Furlan"; "promoted_content" = "&lt;null&gt;"; query = "%22Daniel+Furlan%22"; url = "http://twitter.com/search?q=%22Daniel+Furlan%22"; }, { events = "&lt;null&gt;"; name = JHud; "promoted_content" = "&lt;null&gt;"; query = JHud; url = "http://twitter.com/search?q=JHud"; }, { events = "&lt;null&gt;"; name = "Omg Adam Lambert"; "promoted_content" = "&lt;null&gt;"; query = "%22Omg+Adam+Lambert%22"; url = "http://twitter.com/search?q=%22Omg+Adam+Lambert%22"; }, { events = "&lt;null&gt;"; name = "Macklemore &amp; Ryan Lewis"; "promoted_content" = "&lt;null&gt;"; query = "%22Macklemore+%26+Ryan+Lewis%22"; url = "http://twitter.com/search?q=%22Macklemore+%26+Ryan+Lewis%22"; } ); } ) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload