Monday 15 June 2015

objective c - Facebook iOS SDK : get likes of an object silently -



objective c - Facebook iOS SDK : get likes of an object silently -

does know how facebook open graph object (fbgraphobject) url without forcing user log facebook account, i.e having open fbsession.

a little explanation: have url instance: http://www.marmiton.org/recettes/recette_crepes-suzettes_12203.aspx (really french recipe) , calling:

[fbrequestconnection startwithgraphpath:theurl] parameters:nil httpmethod:@"get" completionhandler:^(fbrequestconnection *connection, id result, nserror *error) {}];

i have next 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 grab share_count values. looking for.

but if fbsession activesession not open (nor session) sdk gives me this:

fbsdklog: error request endpoint 'http://www.marmiton.org/recettes/recette_pate-a-crepes-simple_27121.aspx': open fbsession must specified calls endpoint.

i don't need/want have users logged in likes (share_count).

does know how create request silently, i.e without having start user session?

thanks help.

finally found hidden api call: @"https://api.facebook.com/method/links.getstats?urls=%@&format=json" returns usefull info on given fb object url.

ios objective-c facebook facebook-graph-api facebook-ios-sdk

No comments:

Post a Comment