Is it possible to extend Facebook tokens with extendAccessTokenIfNeeded in an Android app?

前端 未结 2 346
名媛妹妹
名媛妹妹 2020-12-24 15:46

I think this might effect a lot of Facebook/Android developers and yet there does not seem to be that much discussion on the topic...

My question

相关标签:
2条回答
  • 2020-12-24 15:57

    Try changing the time of REFRESH_TOKEN_BARRIER, so that you do not have to wait 24 hours every time you want to test. I changed mine to about 2 minutes, and I was able to see that the access token was actually being extended when I re-launched the app after 2 minutes.

    0 讨论(0)
  • 2020-12-24 16:08

    I don't know Android development, but if you're having issues with that function, maybe there's a similar function of CURL within Android that will allow you to call https://graph.facebook.com/oauth/access_token?
    client_id=APP_ID& client_secret=APP_SECRET& grant_type=fb_exchange_token& fb_exchange_token=EXISTING_ACCESS_TOKEN

    (google revealed: http://thesoftwarerogue.blogspot.com/2010/05/porting-of-libcurl-to-android-os-using.html on how to CURL from Android)

    0 讨论(0)
提交回复
热议问题