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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:42:33+00:00 2026-06-13T03:42:33+00:00

I am searching for something similar to what Facebook::setAccessToken($access_token) does in the PHP SDK

  • 0

I am searching for something similar to what Facebook::setAccessToken($access_token) does in the PHP SDK ; that is, set the access token used for subsequent requests (having retrieved it by other means).

In the Javascript one, I can only find the getter (FB.getAccessToken). I imagine this has been made on purpose to avoid using the access token client-side, but what are the risks if only the user related to the access token can see it ?

I could embed it as a parameter for each query, but this is impossible for XFBML as far as I know.

Any idea ?

  • 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-13T03:42:34+00:00Added an answer on June 13, 2026 at 3:42 am

    There is nothing built-in in the SDK.

    If you really needed it, you could hack it this way:

    FB.provide('', {
      'setAccessToken': function(a) {
        this._authResponse = { 'accessToken': a };
      }
    });
    // Usage
    FB.setAccessToken('my_access_token');
    

    But if you do this, Facebook will log to their server that you use a “deprecated” function of their SDK and send you a warning message.
    Better pass it to the requests directly (this is what I ended up to).

    That does not work for XFBML though (you will have to issue FQL queries yourself and populate your own markup).

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

Sidebar

Related Questions

I'm searching a while for this and I can't found something that works for
I've been searching the Qt docs for something similar to a GtkSpinner , but
Is there such thing? I have been searching the net for something similar to
I've been searching around for something similar but couldn't find it (or what I
I am trying to creating something similar to facebook timeline in facebook website. I
I'm searching for a day / timeline control for android. Something similar to the
I remember reading something once, but could not find it now while searching, if
Searching for values that uses the same value Example SELECT Name, UnitPrice, Quantity, Color
Searching here I found that this question was already asked , but I think
I'm planning on building a file cataloging system. It will do something very similar

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.