I wrote a facebook application but authentication is not working properly. Despite of googling several hours it did not solve. please please write the script which authenticates the user properly and if the user clicks the allow button simply display the text "Welcome" assuming that i have written all basic suff aas..
require 'sdk/src/facebook.php'; $app_id = 'MY APP ID'; $canvas_page = "MY CANVAS URL"; // Create our Application instance (replace this with your appId and secret). $auth_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($canvas_page) ."&scope=email,read_stream&installed=1"; $facebook = new Facebook(array( 'appId' => $app_id , 'secret' => MY APP SECRET, 'cookie' => true, )); ///... your code to solve !
Nobody provides the ultimate solution: Finally I solved it by myself. what I do is. Facebook sends an "
installed=1
" parameter with the url when the user allows the application. SO I checked this parameter and redirected again to the application. I m extremely happy on finding extremely nice and efficient solution. Nobody answered me any votable answer.