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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:21:00+00:00 2026-05-18T21:21:00+00:00

Facebook document that you need to do the following for canvas login Include facebook

  • 0

Facebook document that you need to do the following for canvas login

  1. Include facebook library
  2. Instantiate class with App Id and secret
  3. Check that the user has a valid session

    If they do check also that you can get there user object by doing an api call /me

    If they dont then process the login redirect

All this especially the Facebook calls can take quite some time to process

The example shows this in terms of code
http://github.com/facebook/php-sdk/blob/master/examples/example.php

And from what I read it seems required on every page. Because a user can logout / remove app / change permissions etc during the session

My question is what is the ideal way of doing the above in terms of performance gains, but still making sure that it conforms to the nuiances of facebook.

Facebook do give a session expire time which seems to be in GMT.

I code in PHP using the Zend Framework but I suppose the above relates to all languages.

Appreciate your help on this

  • 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-18T21:21:01+00:00Added an answer on May 18, 2026 at 9:21 pm

    Ian, store your user facebook credentials in the user related table (or whatever)

    facebook_user_id
    facebook_secret
    facebook_token

    make it come out like something like:

    $user->facebook_session_array();
    

    Then just pass that into your api class when you want to reuse it. There is nothing you can do to make the oauth process (on authentication) go any faster because it has to happen live.

    Cache the living daylights out of anything and everything you bring back from facebook.. run some crons in the background to either insert that stuff to table or stamp it down on a drive. Your cron script should be able to handle potential rate limitations. I wrote some, but facebook is so slow, I think it was pointless.

    Facebook is slow.. don’t make your app wait for it in any way you can avoid it.

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

Sidebar

Related Questions

When I use facebook.com/share.php?u=mysite.com, what must I do in my index.html document so that
I have an existing asp.net web app that uses facebook to authenticate users. I
I need to get a hold of a user of my app's list of
Whenever I try to disconnect the user from my website that uses the Facebook
I'm using Facebook's Javascript SDK to allow login/logout, and my problem is that when
I have a little web app that uses the Facebook like widget. This page
I was reading facebook javascript SDK when I saw the following syntaxt that I
Facebook Connect seems like the cool new way to leverage a user's Facebook account
In Facebook's Compose Message, each name that appears in the TO field uses a
My Facebook application contains Javascript that works in Firefox and IE, but aborts in

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.