-
Notifications
You must be signed in to change notification settings - Fork 1
/
subscribe.php
22 lines (19 loc) · 939 Bytes
/
subscribe.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
require "access_token.php";
//user updates
$param = array('access_token' => $access_token,
'object' => 'user',
'fields' => 'name,feed,email, friends, activities, interests, music, books, movies, likes, checkins',
'callback_url' => 'http://dev.riktamtech.com/venu/facebook/real_time/callback.php',
'verify_token' => VERIFY_TOKEN
);
$subs = $facebook->api('/'.FB_APP_ID.'/subscriptions', 'POST', $param);
//permission updates
$param = array('access_token' => $access_token,
'object' => 'permissions',
'fields' => 'email, user_birthday, user_location',
'callback_url' => 'http://dev.riktamtech.com/venu/facebook/real_time/callback.php',
'verify_token' => VERIFY_TOKEN
);
$subs = $facebook->api('/'.FB_APP_ID.'/subscriptions', 'POST', $param);
echo "Sucessfully subscribed";