Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7926193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:39:46+00:00 2026-06-03T18:39:46+00:00

I am working on a product which has both a desktop web site and

  • 0

I am working on a product which has both a desktop web site and a native iOS application. We are providing Facebook connect as a login option for our users in both contexts.

My intention was to share the same Facebook tokens via a secure JSON API for use in both contexts: when a user signs in on the web, the token is stored to our backend so that when the mobile client next runs, it can download the token and use it as well, and vice-versa. (* The detailed reasoning for this approach I explain at the end of the question, and is not essential to the question.)

The problem: when the iOS client uses a token to preset a feed dialog, if that token is generated by the web using the server-side flow, the dialog webview renders an error:

“An error occured with {my app name}. Please try again later.”

This is reliably reproducible:

  1. Generate a new access token using the server-side flow. Make sure you request publish_actions permission since you’ll be using the feed dialog.
  2. Using an incognito browser window (to get an empty cookie jar), view the m.facebook.com page that the iOS feed dialog would render in its webview: https://m.facebook.com/dialog/feed?access_token=SERVER_SIDE_FLOW_ACCESS_TOKEN&app_id=YOUR_APP_ID&redirect_uri=fbconnect%3A%2F%2Fsuccess&sdk=2&display=touch

Alternatively to #2 you could do all the work (which I have done already) of creating a dummy iOS app with the Facebook SDK, instantiating it correctly and presenting the dialog. It’s just easier to go straight to the m.facebook.com feed URL for the purposes of reproducing the error.

If the token was generated by the auth flow initiated by the native Facebook iOS SDK instead of the server-side auth flow, the above feed url works perfectly fine, as expected.

Additionally, either token (mobile or server generated) works perfectly fine for posting feed items directly via the graph api. The problem is really just with the mobile feed dialog.

Is Facebook intentionally disallowing server-side generated tokens from operating in mobile feed dialog contexts?

Is this a bug with the feed dialog endpoint on m.facebook.com?

Or, hopefully, am I doing something wrong?


Why do I want to share tokens?

  • Since the offline_access permission is being removed, each client (web vs mobile) can benefit from having the other client refresh the same token when the user is active. This will lead to fewer instances of token expiry, and therefore fewer cases in which users must re-authenticate from scratch.
  • Likewise, users are not asked so frequently to approve additional permissions, since each client can benefit from the other’s permission augmentations.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T18:39:48+00:00Added an answer on June 3, 2026 at 6:39 pm

    The tokens you get from the server side auth are different from the ones on the client side (I look at iOS/Android as client).
    The server tokens are long lived one (60 days) while the client ones are short lived (a few hours).

    The server side flow adds another layer of security where your servers authenticate against the facebook servers, which is probably why you get a long lived token automatically when using this flow.

    If you try the debugger with an access token you will receive information about the token, such as the “origin” of the token.
    For example a token generated from a client side auth (using js) has “Origin: Web”.
    That means that facebook indeed differentiate between tokens.

    I’m not 100% sure about this, but from what you’re saying it does sound like facebook is limiting the UI to the usage of client tokens and not server side ones, probably because the dialogs let the user do things without the need of the app to get permissions, and so if you have a 60 days token your app can then use it instead of the user and do things on his behalf with out having his permission.
    I’m just guessing here.

    What I would recommend you is to use the server token only on the server side, and let the iOS client handle his own token.
    According to the Handling Invalid and Expired Access Tokens guide, it states:

    iOS native applications

    API errors are handled by the FBRequestDelegate interface. When you
    detect an access token is invalid or has expired, your application
    will need to multi-task over to the Facebook iOS app. Assuming the
    user has not deauthorized your app, they will be immediately
    multi-tasked back to your iOS application with a fresh, valid access
    token.

    Which means that you don’t have to worry about the token getting expired on the client side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a DotNetNuke site which has both a staging and production server.
I'm working on a web product that may be hosted as an intranet site.
I am creating an android application which has to execute web requests in the
I'm working on a new feature for our product, a component of which has
I'm working on a product website which has a fair amount of text. The
I'm working on a product which relies on several different projects each hosted in
I am working on a product which uses C++ primarily for its core components.
I am working on a product data importing system which downloads product data from
The product I have been working on has been in development for the past
I'm currently working on the internationalization of a product and an issue has come

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.