Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Token from my app doesn't work when I try to use it in a Facebook (FQL)

I am using FQL(mentioned below) to retrieve friends checkins, When I try my query on graph explorer it works fine and gives the required results so this means that there is no problem with the my query but when I try the same query in my app to do so using access token from my app it gives empty array,

I have given following permissions,

   friends_status  
   user_status 

though I have tried with other permissions also.

FQL that I am using is:

SELECT checkin_id FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) and timestamp > 1362787200.

I want to use this in making batch request in which I get the checking ids from this FQL and then use them to get information in a dependent query. I have other solutions but they are time taking.

like image 796
Ajay kumar Avatar asked Dec 07 '25 08:12

Ajay kumar


1 Answers

Your access token is probably expired. It can be tricky to keep up with access tokens, so instead try looking at having the user log in using a Session and managing its state. It'll automatically keep track of access tokens for you. Then you can do a Request via the 3.0 SDK and specify "fql" as a parameter.

If the user has logged in once, if you open up the session on app startup, it'll automatically log them in with a refreshed token.

like image 176
Wenger Avatar answered Dec 08 '25 20:12

Wenger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!