Comments (4)
@jeffg2k, how would you propose implementing logging out from the API in Python?
from facebook-sdk.
I thought since the API had stuff for oauth, getting the access token, auth_url, that perhaps something could be added that logged off the user from that access token. Wasn't sure if it should go in here or what would need to be done. I've tried it in Javascript, but my app, based on the soccialcookbook just logs them right back in. So I thought that it probably needed to be done in the python code that is the backend, which uses facebook-sdk.
from facebook-sdk.
Facebook's Graph API does not contain a method to invalidate access tokens, so there is no way for this SDK to "logout" a user (especially since the GraphAPI
object does not store the state of users or the validity of its access token.
A quick look at socialcookbook suggests that the code does not use this SDK or Facebook's original code, and instead compiles Graph API requests directly. As a result, the issue you created at the socialcookbook repository is probably a better place to get answers.
More importantly, note that FB.logout will only work properly if you are also using the JavaScript SDK for login (e.g. if you use the get_user_from_cookie
method). If you are using server-side OAuth authentication (e.g. with auth_url
and get_access_token_from_code
) - as socialcookbook seems to, how you logout will depend on your application's structure.
from facebook-sdk.
Thanks for the thoughtful and detailed reply Martey, much appreciated. Sorry about the confusion, I must be using facebook-sdk for something else and got confused.
from facebook-sdk.
Related Issues (20)
- Release 4.0.0 to support after deprecation on 7/26/2020 HOT 5
- the package version is too old HOT 1
- How to get photo and message of a specific post via URL HOT 1
- get all connections support time-based pagination HOT 1
- Release support for Graph API version 8.0 HOT 2
- Why it's no v.8, but still 3.1.0 that is deprecated? HOT 3
- login-facebook HOT 1
- Replace the image of a facebook post
- Facebook graph
- [FEATURE REQUEST] Type hinting
- [Bug] Remove support for deprecated Graph API Version "3.1". HOT 3
- how we can post an image with caption to group or page i need help
- JSONDecodeError raised when trying to use put_object method HOT 1
- Update supported versions HOT 4
- H
- How can i put love react on post facebook API
- Hihu HOT 1
- Unable to fetch more than 25 comments
- Could I please receive all notifications and messages for this email
- Any New Release ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-sdk.