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 525635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:41:33+00:00 2026-05-13T08:41:33+00:00

I have a mobile application that I’m using with Facebook connect. I’m having trouble

  • 0

I have a mobile application that I’m using with Facebook connect. I’m having trouble getting an offline_access session key after a user has granted extended permissions.

Here’s the user flow:

  1. User goes to my site for the first time
  2. I send them to m.facebook.com/tos.php? and pass my api key and secret
  3. The user logs in using Facebook connect
  4. Facebook returns them to a page in my site, mysite/login-success.php with an auth_token in the query string
  5. On mysite/login-success.php I instantiate the FB api client and check to see if I already have an offline_access session key for them:
    $facebook = new Facebook($appapikey, $appsecret);
  6. If they haven’t already provided offline_access FB gives me a temporary session key I need to get offline_access permission from the user so I forward them on to http://www.facebook.com/connect/prompt_permissions.php? and pass offline_access in the querystring.
  7. The user authorizes offline_access and get forwarded to mysite/permissions-success.php

The problem I’m having is that after instantiating the API client on permissions-success.php the session key I have is still the temporary session key, not a new offline_access session key.

The only way I’ve found to get the offline_access key is to delete all cookies for the user and then have them login again using Facebook connect. A fairly poor user experience.

Can anyone shed some light on how to use the Facebook api to generate a new session key even if one already exists (in my case a temporary session key)?

  • 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-05-13T08:41:34+00:00Added an answer on May 13, 2026 at 8:41 am

    I am using Java FB API for my FB Connect APP. I think the trick is the same for PHP.

    The trick is force Facebook to automatically login your user again once their granted your the permission, so that you able to capture a offline-access session key, and store in your database for future use.

    Steps :
    1. Once user sign in your via FB Connect, display welcome message
    2. Ask user to grant all require permissions for you app with URL format as below
    http://www.facebook.com/connect/prompt_permissions.php?api_key=YOUAPIKEY&ext_perm=offline_access,read_stream,publish_stream&next=http://m.facebook.com/tos.php?api_key=YOUAPIKEY&v=1&cancel=CancelURL“> Grant permissions

    1. FB will do a call back to your a new auth-token, which you able to get the valid offline assess key..

    Hope this help

    Cheers
    James

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

Sidebar

Related Questions

I have developed a Mobile application that connect to my Web Servie via RESTful
I have a mobile web application that uses the Javascript SDK to connect to
I currently have a mobile application that can record speech as either a WAV
I have a windows mobile 5.0 application (smartphone) that contains a flat data file
I have an AIR application that I'm compiling to mobile. There is an iOS
I have an ASP.Net Application that sends text messages to mobile phones. It does
I have created a mobile application using kendo Mobile UI's trial version in asp.net
I have a Java Mobile application using CLDC 1.0 and MIDP 2.0 and I
I have a mobile application that has a Text Input used for searching. Below
I have a Windows Mobile application. Within that application, i've got a ScrollViewer which

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.