Storing facebook token for offline access

前端 未结 3 987
礼貌的吻别
礼貌的吻别 2021-01-03 16:54

I am looking for a way to save the access token to allow the user to post on facebook without having to log in for each call to the graph API :

I require an offline_

3条回答
  •  情话喂你
    2021-01-03 17:29

    Make sure to call :

    [[NSUserDefaults standardUserDefaults] synchronize];
    

    This will "save" your preferences to disk/flash.

    Also do an NSLog on the token before you save it to make sure it's not nil.

提交回复
热议问题