0

does anyone know how to get the Facebook Open Graph object (FBGraphObject) from an url without forcing user to log to his facebook account, i.e having to open a FBSession.

A little explanation: I have this url for instance: http://www.marmiton.org/recettes/recette_crepes-suzettes_12203.aspx (really good french recipe) and by calling:

[FBRequestConnection startWithGraphPath:theURL]
                             parameters:nil
                             HTTPMethod:@"GET"
                      completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {}];

I have the following result:

{
  "og_object": {
    "id": "", 
    "description": "", 
    "title": "", 
    "type": "", 
    "updated_time": "2014-10-17T12:30:23+0000", 
    "url": "http://www.marmiton.org/recettes/recette_crepes-suzettes_12203.aspx"
  }, 
  "share": {
    "comment_count": 0, 
    "share_count": 64
  }, 
  "id": "http://www.marmiton.org/recettes/recette_crepes-suzettes_12203.aspx"
}

And from this I grab the share_count values. What I am looking for.

BUT if the FBSession activeSession is not open (nor any session) the SDK gives me this:

FBSDKLog: Error for request to endpoint 'http://www.marmiton.org/recettes/recette_pate-a-crepes-simple_27121.aspx': An open FBSession must be specified for calls to this endpoint.

I don't need/want to have my users logged in to get the likes (share_count).

Does anyone know how to make this request silently, i.e without having to start user session?

Thanks for your help.

cire.boroguies
  • 1,071
  • 9
  • 18

1 Answers1

0

Finally I found that hidden api call: @"https://api.facebook.com/method/links.getStats?urls=%@&format=json" This returns all the usefull info on a given FB object url.

cire.boroguies
  • 1,071
  • 9
  • 18