I have made a page where I have write a code to check if user like our page or not.
require("./sdk/src/facebook.php"); $facebook = new Facebook(array( 'appId' => '324859924285629', 'secret' => '545443', )); $user = $facebook->getUser(); var_dump($user); if ($user) { try { $likes = $facebook->api("/me/likes/526672940684211"); if( !empty($likes['data']) ){ echo "1"; } else{ echo "0"; } } catch (FacebookApiException $e) { $user = null; } } if ($user) { $logoutUrl = $facebook->getLogoutUrl(); } else { $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'user_likes' )); }
it's give me 0 user if I am not using Facebook from the ID I create my app.
Secondly when user invite the friends it's allow other to invite friend.
Now can This code work without permission. I means Can I check their like us or not by just place a sample app. Is they need permission or not.
Source: http://stackoverflow.com/questions/14301194/facebook-app-not-worked
kevin kolb sarah shahi george clooney rutgers dharun ravi george clooney arrested ravi
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.