iOS Facebook SDK: An active access token must be used to query information about the current user

前端 未结 5 2192
温柔的废话
温柔的废话 2020-12-30 06:01

I have followed many examples and looked at many questions regarding this access token error, but I can\'t seem to find out why I am getting it or how to fix it.

I i

5条回答
  •  再見小時候
    2020-12-30 06:34

    I got this error in v4 of the SDK when attempting to use a FBSDKGraphRequest object that had been created before logging in. When I changed this to create the FBSDKGraphRequest immediately before using it (i.e. after having logged in) it worked fine. It seems the initializer for this class sets some token that isn't refreshed when the request is started.

    I tried updating the request's tokenString property after logging in, but for some reason this is a readonly property.

提交回复
热议问题