Wednesday, February 20, 2013

Facebook PHP SDK - basic example not working

Im still in the process of creating a Facebook app, I decided to not use the SDK originally because I couldnt get it to work, however, I just ran into many problems which I couldnt get around so figured id try and find out why the SDK wont work.

Now, when I use the code posted on the Facebook page which simply returns the users name (this was extremely simple to do without the SDK).

Part of the code is the following:

// No user, print a link for the user to login $login_url = $facebook->getLoginUrl(); echo 'Please <a href="' . $login_url . '">login.</a>'; 

Which is all that is shown when I try and load the app, it says "Please login" and when I click it, it loads for a few seconds and says "Please login" once again.

I was just wondering if anyone knew what the issue is?The code is exactly the same as that copied from: http://developers.facebook.com/docs/reference/php/facebook-api/ Replacing the relevant information such as app_id, etc.

I dont know if this is relevant but for some reason the server wont let me use file_get_contents, only curl.

Source: http://facebook.stackoverflow.com/questions/14971559/facebook-php-sdk-basic-example-not-working

zipper armenian genocide asteroid mining memorial day ivan rodriguez planetary resources mothers day gift ideas

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.