Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure if it's what you are looking for, but if you are trying to do something simple like getting the public posts of a user, you can do it like this.</p> <p>Use the following request to get the token:</p> <pre><code>https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&amp;client_secret=YOUR_APP_SECRET&amp;grant_type=client_credentials </code></pre> <p>I'm guessing you've got your app id and secret since you've retrieved the token already. Anyway, the token will be returned in the response like this:</p> <pre><code>access_token=ACCESS_TOKEN </code></pre> <p>Parse out the token: and put it in the following request:</p> <pre><code>https://graph.facebook.com/FACEBOOK_USER_ID/posts?access_token=ACCESS_TOKEN </code></pre> <p>You can use the following code to parse out the token:</p> <pre><code> NSRange access_token_range = [responseString rangeOfString:@"access_token="]; if (access_token_range.length &gt; 0) { int from_index = access_token_range.location + access_token_range.length; NSString *access_token = [responseString substringFromIndex:from_index]; NSLog(@"access_token: %@", access_token); } </code></pre> <p>EDIT: The get posts URL will give BadURL due to illegal chars. You can do like this to fix it:</p> <pre><code>NSString *encodedURLString = [yourUrlString stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; NSURL *url = [NSURL URLWithString:encodedURLString]; </code></pre> <p>I'm not using the Facebook SDK, so I don't really know how it works, but I guess that you should do something like this:</p> <pre><code>[_facebook requestWithGraphPath:@"[user_id]/feed" andParams:[NSMutableDictionary dictionaryWithObject:ACCESS_TOKEN forKey:@"access_token"] andHttpMethod:@"GET" andDelegate:self]; </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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