Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Update post-on-user-timeline.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sohaibilyas committed Jan 5, 2017
1 parent a9dd901 commit f2cc75d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions post-on-user-timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
} catch(Facebook\Exceptions\FacebookResponseException $e) {
// When Graph returns an error
if ($e->getCode() == 190) {
unset($_SESSION['facebook_access_token']);
unset($_SESSION['facebook_access_token']);
$helper = $fb->getRedirectLoginHelper();
$loginUrl = $helper->getLoginUrl('https://apps.facebook.com/APP_NAMESPACE/', $permissions);
echo "<script>window.top.location.href='".$loginUrl."'</script>";
Expand All @@ -61,7 +61,7 @@
// message must come from the user-end
$data = ['message' => 'testing...'];
$request = $fb->post('/me/feed', $data);
$response = $request->getGraphEdge()->asArray;
$response = $request->getGraphNode()->asArray;
} catch(Facebook\Exceptions\FacebookResponseException $e) {
// When Graph returns an error
echo 'Graph returned an error: ' . $e->getMessage();
Expand Down

0 comments on commit f2cc75d

Please sign in to comment.