I want to retrieve user's music likes from Facebook. I have subscribed to realtime updates and appropriate permissions are set in the App itself.
I am using facebook's UI to set permissions and Realtime updates
Set "User & Friend Permissions" permissions in facebook App.
- user_interests
- user_likes
- user_location
- friends_interests
- friends_likes
- friends_location
- user_actions.music
- friends_actions.music
Set desired values for realtime updates.
- music
- likes
- interest
- current_location
- checkins
Code for my callback URL is :
$myverify_token = 'vt1';
if($_SERVER['REQUEST_METHOD'] == 'GET') {
if($_GET['hub_verify_token'] == $myverify_token) {
$handle = fopen('f_d.txt', 'w');
fwrite($handle, 'FaceBook can GET me');
fclose($handle);
echo $_GET['hub_challenge'];
}
}
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$data = file_get_contents("php://input");
$json = json_decode($data);
$handle = fopen('f_d.txt', 'w');
fwrite($handle, $json);
fclose($handle);
}
f_d.txt has 777 permissions set.
When I test mycallback URL the GET conditions is true and 'FaceBook can GET me' is written to file. Now I clear the contents of file (NOT Delete).
Now I login to my facebook, make changes to music likes. Waited all day still no push from Facebook. The file is still blank. Not even GET request to my callback URL ??
What else do I need to get proper Realtime updates ?
Posted on facebook : https://developers.facebook.com/bugs/394779173962716