Comments

  1. Remya says

    “App Not Setup: The developers of this app have not set up this app properly for Facebook Login.”

    I got above the error while login to facebook thorugh myApp and also your demo.

  2. andres says

    Hi, after facebook login I can’t redirect, this is the message:

    Esta página web tiene un bucle de redireccionamiento

    Pleas help!

  3. Shailesh kumar says

    Hi

    The code I have uploaded on my server

    http://wa-webmarketing.com/Facebook_Twitter_2/

    It logs me in with my facebook id with which I have created app id, but does not log me out from facebook when I try to logout.

    More over when I try login using another facebook id it does not redirects me to the HOME page, though it log me in in the backbround when I open facebook in other Tab.

    So problem basically in redirection.

    The same happens with this ur example http://onlinewebapplication.com/Facebook2/

    Thanks

  4. vivek says

    hello,

    i have done every step according to your guide/tutorial, and everything is working fine for me. Only one error was bothring me regarding the version, so I have changed it to 1.1.
    So right now, in db only some fields are inserting once user gets logged through api.
    And I want to insert all fields such as :
    email, twitter_oauth_token, twitter_oauth_token_secret.
    Rest of the other fields are inserting properly.

    Could you please guide me properly on it.

    Any help would be greatly appreciated.

    • Delud3d says

      I am also interested in this question. How can we leverage the ability to tweet on behalf of users once this has all been configured? I see the twitter_oauth_token and twitter_oauth_token_secret are being stored in the session, but not the database. I take it that is on purpose. Are there any examples or links on how to use the token/token secret and tweet on behalf of the user?

      Thanks

  5. Chris says

    The Facebook works great! But I keep getting: Something wrong happened.
    with the Twitter login. I followed all of the steps, any ideas?

  6. Med says

    First of all thank you for this tuto, until now, it’s the best tuto i tried. But some thing seems to be wrong on my application.
    The problem is that when the box dialog of facebook appear and when i click ok there is no redirection to my website and the dialog box reappear !

  7. Rajkaran sahu says

    Hi
    I am using this downloaded code but logout is not working…
    can you plz kindly tell me how can logout from facebook on our website

      • Ravi Agarwal says

        Hi,
        thanks a lot for such a nic8 script for twitter login but I have not been able to download the updated source code as old one is not working

        Please help me to download new one I have been following your blog on google + also

        Thanks a lot in advance

        Regards
        Ravi Agarwal
        Knowledge Ashram Pvt Ltd

  8. rahul says

    dear i am using this code with xampp.and i am getting error as Fatal error: Uncaught exception ‘Exception’ with message ‘https://login.facebook.com’ in C:\xampp\htdocs\Facebook_Twitter_2\facebook\base_facebook.php:19 Stack trace: #0 C:\xampp\htdocs\Facebook_Twitter_2\facebook\facebook.php(18): require_once() #1 C:\xampp\htdocs\Facebook_Twitter_2\login-facebook.php(3): require(‘C:\xampp\htdocs…’) #2 {main} thrown in C:\xampp\htdocs\Facebook_Twitter_2\facebook\base_facebook.php on line 19

  9. says

    Hi All friends, Login with Facbook using PHP demo has been undated recently, let me know in any issue.

    One more thing this is working absolutely fine.

  10. space odyssey says

    Hello!

    question, is this still working.? this tutorial.? and how to set up the database in mysql , maybe do you can post a picture with the database instructions. details.? how to set up.? the table in mysql.? would like and be thankful for every help. lokking forward to doing this. have agreat one.

  11. harshagrawal022 says

    I am geting this error when i click login via facebook

    Fatal error: Uncaught exception ‘Exception’ with message ‘Facebook needs the CURL PHP extension.’ in C:\wamp\www\Login_Twitbook\facebook\facebook.php on line 4
    Exception: Facebook needs the CURL PHP extension. in C:\wamp\www\Login_Twitbook\facebook\facebook.php on line 4

    • Adarsh Bhatt says

      To Solve this You have to go taskbar and click on wamp icon so it open new menu then php->php extension->click on php_curl. If it is not checked then make chacked.

  12. digvijay singh says

    i have this error::
    Notice: Undefined index: oauth_token in /opt/lampp/htdocs/Twitter/twitter/twitteroauth.php on line 85

    Notice: Undefined index: oauth_token_secret in /opt/lampp/htdocs/Twitter/twitter/twitteroauth.php on line 85

    Notice: Undefined index: oauth_token in /opt/lampp/htdocs/Twitter/login-twitter.php on line 12

    Notice: Undefined index: oauth_token_secret in /opt/lampp/htdocs/Twitter/login-twitter.php on line 13
    Something wrong happened.

  13. Santosh Gudla says

    all are perfect after facebook loginit redirects and prints this error

    “Invalid or no certificate authority found, using bundled information”

    Thanks in advance

  14. Fabien Poulain says

    Hello,
    I install script it’s ok, but i have a problem how post a tweet message afin twitter login ?

    // $tweet->post(‘statuses/update’, array(‘status’ => ‘message test ‘)); not working :(

  15. dadi says

    ok :) fixed also this twitter error also by commenting this class extends Exeption and it worked, BUT now i want get twitter email !! please help i must have email . how can i do ?

    • Subeesh says

      Please let me know how you fixed this in facebook app.

      I am getting same error.
      Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

  16. dadi says

    Hi , and thanks for this script however im getting difficult to make it work .

    in twitter im getting this error:

    Fatal error: Cannot redeclare class OAuthException in /home2/mywebsite/public_html/yahoo-login/twitter/OAuth.php on line 8

    and in facebook this error :

    Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

    any suggest or how can i fix them please.

  17. Sumit Jain says

    Notice: Undefined index: oauth_token in C:\xampp\htdocs\xampp\Login_Twitbook\twitter\twitteroauth.php on line 82

    Notice: Undefined index: oauth_token_secret in C:\xampp\htdocs\xampp\Login_Twitbook\twitter\twitteroauth.php on line 82

    Notice: Undefined index: oauth_token in C:\xampp\htdocs\xampp\Login_Twitbook\login-twitter.php on line 12

    Notice: Undefined index: oauth_token_secret in C:\xampp\htdocs\xampp\Login_Twitbook\login-twitter.php on line 13
    Something wrong happened.

    i am getting this . can u please check and reply me on @ sumit.jain.knit@gmail.com

  18. nuevopico says

    I get error on login-facebook.php file :(
    How To Fix It
    Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /home/u132884909/public_html/login-facebook.php on line 9

  19. Stefania Grillo says

    hi everybody, could someone help me? I have this error:

    Notice: Undefined index: oauth_token in /Applications/MAMP/htdocs/Facebook_Twitter_2/twitter/twitteroauth.php on line 118

    Notice: Undefined index: oauth_token_secret in /Applications/MAMP/htdocs/Facebook_Twitter_2/twitter/twitteroauth.php on line 118

    Notice: Undefined index: oauth_token in /Applications/MAMP/htdocs/Facebook_Twitter_2/twitter/twitteroauth.php on line 82

    Notice: Undefined index: oauth_token_secret in /Applications/MAMP/htdocs/Facebook_Twitter_2/twitter/twitteroauth.php on line 82

    Notice: Undefined index: oauth_token in /Applications/MAMP/htdocs/Facebook_Twitter_2/login-twitter.php on line 15

    Notice: Undefined index: oauth_token_secret in /Applications/MAMP/htdocs/Facebook_Twitter_2/login-twitter.php on line 16
    Something wrong happened.

  20. shweta says

    I am facing following warning when i login

    Given URL is not allowed by the Application configuration.
    One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

    after i input user name & password following error message comes,

    The parameter redirect_uri is required.

    where i can change it and what all settings required when creating app in facebook

  21. grandioseincubu21.sosblogs.com says

    It’s really very complex in this active life to listen news on TV, therefore I just use internet for that purpose, and obtain the
    most recent news.

  22. Sourabh Chakraborty says

    Hey man, very helpful post! Thanks a ton!

    I was wondering what would the next step be to post a status msg on the user’s wall? I guess I don’t know enough php to extend the TwitterOAuth class :P

    Thanks again for all your help!

  23. bindu says

    Notice: Undefined index: oauth_token in /opt/lampp/htdocs/twitter/twitter/twitteroauth.php on line 82

    Notice: Undefined index: oauth_token_secret in /opt/lampp/htdocs/twitter/twitter/twitteroauth.php on line 82

    Notice: Undefined index: oauth_token in /opt/lampp/htdocs/twitter/login-twitter.php on line 12

    Notice: Undefined index: oauth_token_secret in /opt/lampp/htdocs/twitter/login-twitter.php on line 13
    Something wrong happened.

    • Sourabh Chakraborty says

      Hey bindu, are you trying this on localhost? Also, did you put in the consumer key and consumer token values inside the config folder in the twconfig.php file?

      • Stefania Grillo says

        Hi, I have the same problem. I’m trying it on localhost and I’ve put the consumer key and token inside the twconfig.php. How can I fix the problem? Thank you in advance.

  24. raj says

    why i’m geting this error : Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

    • Hemanta Nandi says

      Go to to Developers section of facebook , select your app , click on “Edit app” , make sure Sandbox Mode is Disabled.

  25. Mohsin Shahid Peracha says

    You guys simply rocks a life saver after a lots of search got this code
    bundle of thnx

  26. logesh says

    its work for me in my sub domain. but twitter login is not working in the producation server. i don’t know, is there any blocking from server side for curl issues. will you help me to out from this.

    Thanks.

  27. Mihir Sanghavi says

    I am facing following warning when i login

    Given URL is not allowed by the Application configuration.
    One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

    after i input user name & password following error message comes,

    The parameter redirect_uri is required

  28. Mihir Sanghavi says

    I am getting following Error in twitter Login
    #########################

    stdClass Object
    (
    [errors] => Array
    (
    [0] => stdClass Object
    (
    [message] => Bad Authentication data
    [code] => 215
    )

    )

    )

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '')' at line 1

    ############################

    • Endo says

      Hi…I am getting this error

      stdClass Object
      (
      [errors] => Array
      (
      [0] => stdClass Object
      (
      [message] => Bad Authentication data
      [code] => 215
      )

      )

      )

      You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '','')' at line 1

  29. Mihir Sanghavi says

    Those all who are having problem installing php Curl :::>>>>>

    If you are running AppServer as a WAMP development environment on a Windows machine, you may experience difficulty installing cURL.

    Here are some helpful steps:

    First go to the WAMP/BIN/PHP directory and copy the following libraries to the C:\Windows\System32 directory.
    ssleay32.dll
    libeay32.dll

    Open the php ini file and remove the ; from extension=php_curl.dll

    Reboot your machine to load.

  30. Scrollgomes says

    Hello,

    I can´t get the email, twitter_oauth_token, twitter_oauth_token_secret, only the username.

    Regards,

  31. Scrollgomes says

    Hello,

    I´ve found out that, changing the line 21 on twitteroauth.php to:
    public $host = “https://api.twitter.com/1.1/”;

    Has solved my problem.

    Regards,

  32. Eugene says

    Facebook login doesn’t work – I’m simply redirected to my facebook’s home page and nothing happens. That’s when I’m already logged in with fb.

    • devarajan says

      Would you please help me to fix this curl error? Infact i would like to integrate your login system in my website login page. Currently i am executing this in my wampservers localhost. the is a problem when i trigger on the login button

      Fatal error: Call to undefined function curl_init() in C:\wamp\www\Login_Twitbook\twitter\twitteroauth.php on line 199
      Call Stack
      # Time Memory Function Location
      1 0.0020 143904 {main}( ) ..\login-twitter.php:0
      2 0.0210 314792 TwitterOAuth->getRequestToken( ) ..\login-twitter.php:8
      3 0.0210 315168 TwitterOAuth->oAuthRequest( ) ..\twitteroauth.php:80
      4 0.0260 318160 TwitterOAuth->http( ) ..\twitteroauth.php:186

      Any suggestion please?

  33. Daniel Lopes says

    Hello,
    Enjoyed the article, so I’m in doubt.
    How do I need to authorize only once and the next time simply log into Twitter to access (without having to always click “authorize”)?

  34. Andre Riis says

    not working anymore

    stdClass Object
    (
    [errors] => Array
    (
    [0] => stdClass Object
    (
    [message] => The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.
    [code] => 68
    )

    )

    )

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '','')' at line 1

  35. Remy Clarkson says

    pls.. the twitter login screen bring up an error that the API version is out of date upgrade to version1.1.

  36. Abdullah says

    Hey
    It is made in twitter REST API v1. Now it is obsolete by twitter. So how can I migrate it v1 to v1.1

    Thanks.

  37. spotifyfreepremiumcode.blogspot.pt says

    Highly energetic article, I liked that a lot. Will there be a part
    2?

    • click here says

      Wonderful site and I wanted to post a note to let you know, “”Good job””! I’m glad I found this blog. Brilliant and wonderful job ! Your blog site has presented me most of the strategies which I like. Thanks for sharing this

  38. mahima says

    Notice: Undefined index: oauth_token in twitteroauth.php on line 82

    Notice: Undefined index: oauth_token_secret in twitteroauth.php on line 82

    Notice: Undefined variable: token in login-twitter.php on line 12

    Notice: Undefined variable: token in login-twitter.php on line 13

  39. Brian says

    Hi I can not seem to get the twitter login to work just getting the error from the killed session. It looks like the problem is causes by the script calling getTwitterdata.php which does not exist.

    Any suggestions?

    • Brian says

      Forgot to copy the getTwitterdata.php file the first time, it is there but I am still getting the same error

  40. Agung says

    Please Guys, I Have Facebook & Twitter Connect Script is Still Be In use, because the above script is not able to …

    thank’s

  41. Sonu Sindhu says

    Such a nice blogs for facebook sdk .
    I very happy to find it by google seach.Really hepful for me.
    Thanks

  42. ToRo says

    # There’s no active session, let’s generate one
    $login_url = $facebook->getLoginUrl(array( ‘scope’ => ‘email’));
    header(“Location: ” . $login_url);

    error….

    not connect $login_url = $facebook->getLoginUrl(array( ‘scope’ => ‘email’));

  43. touzani mhamed (@touzanimhamed) says

    i have this error :

    Notice: Undefined index: oauth_token in C:\Program Files (x86)\EasyPHP-12.1\www\Facebook\twitter\twitteroauth.php on line 82

    Notice: Undefined index: oauth_token_secret in C:\Program Files (x86)\EasyPHP-12.1\www\Facebook\twitter\twitteroauth.php on line 82

    Notice: Undefined variable: token in C:\Program Files (x86)\EasyPHP-12.1\www\Facebook\login-twitter.php on line 12

    Notice: Undefined variable: token in C:\Program Files (x86)\EasyPHP-12.1\www\Facebook\login-twitter.php on line 13

  44. Adrian Zwicker says

    Great script! Got it working, but i’d like to get more data of the user such as date of birth. Where do I have to change the request?

  45. ramakanth says

    when am clcik on twitter button its redirect to login-twitter page and shows “Something wrong happened.”

    please help me as soon as possible

    • Sujan says

      you need to change the redirect code
      $request_token = $twitteroauth->getRequestToken(‘http://localhost/ABC/getTwitterData.php’);
      in login-twitter.php page.

      • Beto says

        hi, i have same problem, in login-twitter.php page have getRequestToken(‘http://MYURL/getTwitterData.php’); but, the problem continue, please help me

  46. ramakanth says

    IN login-twitter.php Page am getting this error “Something wrong happened”

    please help me soon and what changes i need to do in this page

    thanq

  47. ramakanth says

    This Article Is Not Clear Please Post Some More Information.

    Please Provide login-twitter.php Page Full Source Code.

    And Please Provide Library files or Downloadable URLs for Library files please help me soon

  48. stuffin says

    Sweet. Got Twitter working fine. Made some tweaks to Facebook App (“App Domain” & selecting “Website with Facebook login”). I get to the sign in page now, but get the error “This webpage has a redirect loop”. Any ideas?

  49. Rajanya says

    I am not able to login with Twitter. The login-twitter.php is not working. I think its getting stuck when its make call to getTwitterData.php. Plss help.

  50. stuffin says

    Bummer. Even your new demo is throwing an error on Facebook as of today (feb 21). Will check back to see if you get it working. Very much appreciate your effort.

  51. kiran says

    Hi,
    I created one application in facebook to integrate facebook login in my website.
    The login accepts only the facebook application created user. When i trying to login with another facebook account it gives me an error ‘An error occurred. Please try again later.”. Please tell me where i was worng?
    Thanks in advance…

  52. Suresh Kumar says

    I am getting error message when I try to login with Facebook

    Error”An error occurred please try again later”

    Plz help me to resolve this

  53. karthi says

    hi pls help me..i got this error from facebook page… pls reply me anybody..i cant login

    below this message i got:
    Error
    An error occurred. Please try again later.

  54. Miro Hristov says

    Great article.
    It would be even better if you re-positioned the new script demo button on top and the original on bottom because I didn’t scroll down enough to see the new demo. So I was going to write a comment about the demo not working and then I saw the new demo button. Idk… just my 2 cents :)

  55. john says

    its not working , i already entered mysql database , app key and secret but its not redirecting to my page . Please help

  56. andrew says

    hi, thanks for the code, I have download and try it. I have create a new app on facebook and replace the facebook app id and secret id on fbconfig.php. But the code in “login-facebook.php” below, getSession always return NULL. Any comments ? THANKS.

    // this OK…
    $facebook = new Facebook(array(
    ‘appId’ => APP_ID,
    ‘secret’ => APP_SECRET,
    ‘cookie’ => true
    ));

    // but $session always NULL
    $session = $facebook->getSession();

    • andrew says

      And I forget to say, because the $Session always NULL, $facebook->getLoginURL() always executed.
      But the return $login_url always goes to my ‘normal’ facebook page, not the facebook login URL.
      Thanks.

      • andrew says

        OK, finally I know why .

        Facebook changed the API. Download the most up-to-date Facebook php SDK and use the “getUser()” instead of the “getSession()”.

  57. jack says

    Facebook Login Error: Invalid Argument

    Given URL is not allowed by the Application configuration

    i got this problem, just like previous comments. may i know why and how to get rid of this thing?

      • Stéphane says

        Hi, I’m having the same problems here, could you send me the latest source code as well? Thx in advance and prosperity for 2013!!

      • kabir says

        Well it seems i have the same problem.
        Can you please help me in resolving the same
        Error: API Error Code: 191
        API Error Description: The specified URL is not owned by the application
        Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration

  58. wood coffee table says

    This is a very good tip especially to those fresh to the blogosphere.
    Short but very accurate info… Thanks for sharing this one.
    A must read post!

  59. matias says

    Hi,

    the code is not working for both, no one is redirecting to home.php, can you see the code and fix it.

    i await your comments

    matias navarrete

  60. jose says

    I’m pretty new in this of web development.

    do you know if it exists a pre-programmed HTML for protecting a single page in blogger and could give access to it by authenticating before with Facebook & Twitter?

    I have a sports blog made with blogger & and want to protect (1) page where we broadcast live events. I only want to give acces to this page to those who follow our website.

  61. facebook Apps social apps says

    I think everything published made a ton of sense.
    However, what about this? what if you were to create a killer headline?
    I am not suggesting your content is not good.
    , however suppose you added something to possibly get a person’s attention? I mean Login with Facebook and Twitter using PHP is a little vanilla. You should look at Yahoo’s home page
    and see how they create post headlines to
    grab people interested. You might add a related video or a picture or two to grab people interested about everything’ve got to say. Just my opinion, it would make your website a little livelier.

  62. yogita says

    twiter login button is not working i got error “Access denied for user ‘username’@’localhost’ (using password: YES)” please help

  63. virilio says

    Hi
    I have been using your code for a few weeks, but as of approx. a week ago the Facebook login stopped working! My implementation and your demo. For a few days you were taken to a blank page on the Facebook server, and now you are taken to the Facebook login/your own Facebook Newsfeed. So it looks like Facebook has been moving things around. Any idea? Thanks!

  64. dfsafsdf says

    Using the web to create an effective online persona for your business is a low cost marketing tool, and there is no better way to promote your business than using social media. Apply these simple, yet effective methods of social media optimization to start increasing visibility for your business.

    Read more: How to Promote a Business Using Social Media | eHow.com http://www.ehow.com/how_4579209_promote-business-using-social-media.html#ixzz29XSNrZhc

  65. martylavender says

    I am getting this when attempting to log in with Facebook

    Cannot send session cache limiter – headers already sent (output started at login-facebook.php:29)

    • sai says

      hi i am using this above code it is redirected to site. but i want to print user details without going to live site

  66. omaromar says

    How do you collect the email?

    I’m surprised the most important value is not being collected in this script….

    • masdiblogs says

      Subscribing the onlinewebapplication.com feed is optional now, so never my readers will force to subscribe. Wire about the source codes and demo.

  67. Adam says

    Hey, I cannot seem to download the source code but have subscribed for the newsletter list. What is Email ID? Is it your email or was I suppose to have gotten some kind of ID on the confirmation email? Let me know what I am doing wrong.

  68. jgonzalez (@jgonzal98138316) says

    Hi!!

    You’re code are excelent.
    Well I’m trying to make a register form like pinterest, when you clik one, “autocomplete” the info of the user.
    Did you know any form to do this?
    Thanks you so much.

  69. ward says

    Hi,

    I keep on getting the following error:

    PHP Fatal error: Undefined constant ‘8\xba\xbeN+\x7f’ in /opt/bitnami/apache2/htdocs/login-facebook.php on line 7, referer: http://44.257.113.68/

    It looks like the actual problem is in facebook.php but can’t get it to display where this strange constant is…

    any ideas ?

  70. nazu says

    what is the problem it. always show

    Column count doesn’t match value count at row 1
    what should I do please reply

  71. jonah says

    Awesome article, thanks! How can I get the user’s profile picture? Is there a resource (facebook API) of the available parameters we can retrieve?

  72. Jonathan says

    this script is very cool! TNX

    i have a question.
    If I wanto to have permission other the “base infomration” ?

    For example, e-mail address or event ?

    Where I write the “scope” ?

    Tnx a lot

    Jonathan

    • Pankaj Jha says

      You can use

      $facebook->getLoginUrl(array(‘scope’=>’email’));

      to get the user’s email

      • Jonathan says

        Hi,
        i have write this code at line 51 in login-facebook.php

        $login_url = $facebook->getLoginUrl(array(
        ‘scope’ => ‘email,user_events,friends_events’
        ));

        but i think it was wrong…

        i wanna put this code in the first line of login-facebook.php but i see only $session = $facebook->getSession();

        where i have to put the code u send me ?

        tnx

      • Rathi says

        Hi,
        The above dint work but the following definitely works:
        array(‘req_perms’=>’email’,’scope’=>’email’);

  73. sourabh says

    nice… It really helps me a lot…
    But I just want to know “HOW CAN I PASS some additional parameters with url”????

  74. Suby S Surendran says

    ” Given URL is not allowed by the Application configuration. ”

    thsts my error. pls help me

  75. Victor says

    Hey, the application works on my localhost, but when i put it on server i get the ‘something went wrong’…..really dont get what the problem can be….anybody?

    • Anonymous says

      Hi

      I am also unable to connect when i click on Facebook login button just got following error:
      There was an error.

    • Pankaj Jha says

      Go through the source code Login with Facebook, when profile returns with null value session cleaned and error message through with “There was an error” . So, I think some problem with your Facebook profile connection … make sure that Facebook needs the CURL PHP extension

    • Suby S Surendran says

      CURLOPT_SSL_VERIFYPEER => false, |
      CURLOPT_SSL_VERIFYHOST => 2, |

      add this code in line 108…

      It will work

  76. son says

    If I have logined to system already, how to return callback automatically. I’m building a system connect with twitter.

  77. Anonymous says

    I am getting error after clicking on Facebook connect button

    An error occurred with APP Name. Please try again later.

    Please help, its urgent ?

    • Pankaj Jha says

      Check your Open Graph setting in Facebook if something is pending for publish. otherwise check and remove below line from FB.init()

      xfbml : true // parse XFBML

  78. Anonymous says

    I have same issues, can someone please tell me how to intergrate the fb wallpost function correctly if the user is logged in with facebook?

    $statusUpdate = $facebook->api(‘/me/feed’, ‘post’, array(‘message’=> ‘Testing posting to my wall’, ‘cb’ => ”));

  79. Anonymous says

    Hi Jha, I want to post on a facebook wall if they are sending a message. How I can use below please suggest –
    $statusUpdate = $facebook->api(‘/me/feed’, ‘post’, array(‘message’=> ‘Testing posting to my wall’, ‘cb’ => ”));

  80. Anonymous says

    i there, I am unable to connect while trying to login with facebook account and click on facebook button below error coming. Actually I want;s to integrate setting with my forum by using existing login option, forum is in HP only. There is a option to connect with facebook and twitter but these are also not working

    • Rick says

      Right Mac, this post is similar to srini’s tutorial “How to do Login with Facebook and Twitter”.

  81. Lohtan says

    Great job Pankaj Jha. Can you please write for Google + Yahoo + Facebook + Twitter… login in PHP.

  82. Navneet says

    Some one please help ,

    Fatal error: Uncaught exception ‘Exception’ with message ‘Facebook needs the CURL PHP extension.’

  83. Web Designer says

    I impressive very much you are right thing in this post any face book or twitter attachment in the Google. Thanks sharing this important article.

  84. Anonymous says

    Can you please working with Google Oauth. Google + Yahoo + Facebook + Twitter” will be great.

  85. Alex says

    I get this when trying to use the twitter login, any help would be much appreciated!

    Notice: Undefined index: oauth_token in C:\…\php\social_api\twitter\twitteroauth.php on line 82

    Notice: Undefined index: oauth_token_secret in C:\…\php\social_api\twitter\twitteroauth.php on line 82

    Notice: Undefined index: oauth_token in C:\…\php\script.php on line 39

    Notice: Undefined index: oauth_token_secret in C:\…\php\script.php on line 40
    Something wrong happened.

    • Pankaj Jha says

      Hi Alex,

      you need to enable curl (cURL is a library which allows you to connect and communicate to many different types of servers with many different types of protocols.)
      if u run windows do it
      by uncommenting the extension=php_curl.dllin the xampp\apache\bin\php.ini file

      This will resolve also error like below –
      Fatal error: Uncaught exception ‘Exception’ with message ‘Facebook needs the CURL PHP extension.’ in C:\xampp\htdocs\new\facebook\facebook.php:4 Stack trace: #0 C:\xampp\htdocs\new\login-facebook.php(3): require() #1 {main} thrown in C:\xampp\htdocs\new\facebook\facebook.php on line 4

  86. ed says

    Thanks – this looks great. Is this available for free under a commercially-compatible license such as MIT License? If so, can you please add the MIT License to your source code header to clarify.

  87. Ryan says

    When I click login, it shows up as a text file showing an array, rather then redirecting to facebook. Any suggestions? Thanks

  88. TOM says

    First – thanks for this greate post for Facebook Login

    When ever I am trying to use oath account whether it is of yahoo, gmail or facebook
    below error came out.

    If you can send me the solution that will be great –

    Fatal error: Uncaught exception ‘Exception’ with message ‘Facebook needs the CURL PHP extension.’ in C:\wamp\www\facebooklog\facebook\facebook.php on line 4
    ( ! ) Exception: Facebook needs the CURL PHP extension. in C:\wamp\www\facebooklog\facebook\facebook.php on line 4

    • Vivek Shingala says

      Hey tom, go to your php.ini file in your xampp or wamp server and there remove comment form php_curl.dll and then run the page again.

      just remove ; before the php_curl.dll for removing comment.

  89. Gautam says

    i’m having problems … when logging in i’m redirected back to the site but only query result from oauth provider is shown as an array for the facebook login… can you check in code ?

Leave a Reply

Your email address will not be published. Required fields are marked *