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

I am trying to provide Like buttons INSIDE my Facebook app that will allow
I have a little web app that uses the Facebook like widget. This page
I am trying to build a spotify app that includes a playlist. I need
I need to get a hold of a user of my app's list of
In its document, Facebook recommend using a channel file for its JavaScript SDK. My
I have read the document Authentication (official from Facebook). I still don't understand the
Facebook's documentation states To read an Album you need... Any valid access_token if it
var fb_ps_page = window.location.href; document.write('<iframe src=//www.facebook.com/plugins/like.php?href=' + fb_ps_page + '&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=205223179497882 scrolling=no frameborder=0 style=border:none; overflow:hidden;
I just discovered that the iframe version of the Facebook Like button doesn't honor
I have just implemented Facebook Authentication on my website using Facebook JavaScript. If user

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.