facebook connect- $user_id = $facebook->getUser(); always returning 0 [duplicate]

To get rid of this issue you need to do the following Change $login_url = $facebook->getLoginUrl(array( ‘scope’ => ’email,user_location,user_photos,publish_actions,basic_info’, ‘redirect_uri’ => ‘http://localhost/dist/’ )); to $login_url = $facebook->getLoginUrl(array( ‘scope’ => ’email,user_location,user_photos,publish_actions,basic_info’, ‘redirect_uri’ => ‘http://localhost/dist/index.php’ )); Leave domain name blank in the following setting. Dont give localhost.com App Domains : localhost.com Then Valid OAuth redirect URIs :http://localhost/dist/ … Read more

Facebook iframe tab signed request always empty

Okay, figured it out! When configuring the app, I had filled in the “Tab URL” to be “tab/” This made the full url to the tab page “http://www.example.com/myfacebookapp/tab/” This made sense to me. Apparently, Facebook doesn’t like this. After changing my “Tab URL” to ‘tab/index.php”, the signed request started to show up in the app … Read more

When to request permissions with Facebook’s new Android SDK 3.0?

I was able to get it to work. It’s a modification of your Version 2 sample. The link Jesse provided also helped a ton. Here is the code I run through when authenticating a user: private void signInWithFacebook() { mSessionTracker = new SessionTracker(getBaseContext(), new StatusCallback() { @Override public void call(Session session, SessionState state, Exception exception) … Read more