facebook - Python. A user access token is required to request this resource -
i trying send facebook notification through python facebook sdk. using following http request it:
https://graph.facebook.com/<user id>/notifications?&access_token=<my app access token>&template=my message!!!!
all requests return following response:
{ "error": { "message": "a user access token required request resource.", "type": "oauthexception", "code": 102 } }
i have tried manually in browser. result same. facebook says:
post /{recipient_userid}/notifications?access_token= … &template= … &href= …
so user access token required.... how resolve issue?
thanks in advance.
if stil in development , need valid user token , go https://developers.facebook.com/tools/explorer , generate 1 own user account.
however, if authenticating python, python facebook sdk provides few options.
- get_access_token_from_code
- get_user_from_cookie
- parse_signed_request
all of these provide access user access token can use sign our requests.
Comments
Post a Comment