forked from mahmudahsan/Graph-API---IFrame-Base-Facebook-Application-Development-PHP-SDK-3.0--Source
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathajax.php
More file actions
17 lines (16 loc) · 583 Bytes
/
ajax.php
File metadata and controls
17 lines (16 loc) · 583 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
include_once "fbmain.php";
if ($user){
//update user's status using graph api
if (isset($_REQUEST['status'])) {
try {
$status = htmlentities($_REQUEST['status'], ENT_QUOTES) . " Checkout the tutorial: http://wp.me/pr3EW-sv";
$statusUpdate = $facebook->api('/me/feed', 'post', array('message'=> $status, 'cb' => ''));
} catch (FacebookApiException $e) {
d($e);
}
echo "Status Update Successfull. ";
exit;
}
}
?>