Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible to make Facebook API requests from my backend while using the iOS SDK for authentication?
    primarykey
    data
    text
    <p>I am working on a web service that has a RESTful backend (written using django) and multiple frontends, one of which is iOS. I would like to have as much as possible done by the backend to minimize the frontend complexity, however, this strategy is failing now that I'm trying to integrate the Facebook open graph. </p> <p>What I am currently trying to do is have the user authenticate with facebook using the iOS SDK and then submit the received access token to the backend, with which the backend can, for example, publish an action to the user's timeline. However, when trying to make requests from the backend, I receive the error message: <code>{"error": {"message": "Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons.", "code": 190, "type": "OAuthException", "error_subcode": 460}}</code></p> <p>Presumably, this is because Facebook either recognizes that the request is not coming from iOS or that it is coming from a different host.</p> <p>Is there some way to obtain the code that can be used for <a href="https://developers.facebook.com/docs/authentication/server-side/" rel="nofollow">server-side authentication</a> from the iOS SDK so that the backend itself can request the access token?</p> <p>Perhaps I am just looking at this from the completely wrong angle and should implement graph API interactions on each individual front end?</p> <p>edit: Based on Facebook's own resources and the fact that this isn't a common question, am I right to assume this is simply against best practices for the Open Graph API?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload