How to make User logout from twitter fabric ios

后端 未结 9 1238
慢半拍i
慢半拍i 2020-12-20 16:28

I have made a basic app using Twitter\'s fabric that allows user to tweet within my app and Provide Login With Twitter.Every things works a I Wanted.

相关标签:
9条回答
  • 2020-12-20 16:58

    UPDATE: May 2016 - Framework has changed so this answer is no longer relevant.

    See this answer: https://stackoverflow.com/a/35765833/940709 and this answer: https://stackoverflow.com/a/30916904/940709 instead.

    [[[Twitter sharedInstance] sessionStore] logOutUserID:USERID];

    0 讨论(0)
  • 2020-12-20 16:58

    For Swift try this,

    /**
     *  Deletes the local Twitter user session from this app. This will not remove the system Twitter account nor make a network request to invalidate the session.
     *
     *  @param userID ID of the user to log out
     */
    Twitter.sharedInstance().sessionStore.logOutUserID(userId)
    
    0 讨论(0)
  • 2020-12-20 17:02

    Use below:

    [TWTRSessionStore logout]
    

    Deprecated:

    [Twitter logOut] 
    

    is deprecated.

    Users are encouraged to call - [TWTRSessionStore logout] instead of calling this method on the Twitter instance directly.

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