PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 11, 2022

[FIXED] Facebook PHP SDK (v.3.1.1) questions

 February 11, 2022     facebook, facebook-php-sdk, php     No comments   

Issue

I have recently downloaded the Facebook PHP SDK to try and post to a Facebook user's wall.

My Facebook user is currently logged in but has not used my app.

$user = $facebook->getUser();
if ($user) {
 // user is logged in

} else {
 // user is not logged in
   $url = $facebook->getLoginUrl(array('next' => 'http://localhost.com/php-sdk/examples/example.php'));
   header("Location: $url");
}

I've noticed that it redirects me to a page where it requires me to log into the app, which is kinda weird as this is the first time i have seen this behavior, it says "You are logging into DummyFBApp as User" at the bottom. Whenever i try to use other fb apps it only ask me for permissions to access my information, post, etc.

Is it possible to skip this "login" and only show the dialog whether to allow the app to post to the user wall?


Solution

Yours is server side instead of using the JS SDK, but take a look anyway: Facebook permission dialog (JavaScript sdk) .



Answered By - Alexey Gerasimov
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing