From 07e2c0168994c0837216af7fbca59df821428940 Mon Sep 17 00:00:00 2001 From: Ben Liyanage Date: Thu, 25 Sep 2014 13:41:48 -0400 Subject: [PATCH] begining of unit test This is the begining of my unit test of the code, as well as some notes for how to do the graph 2.1 api calls. --- fbsync/tests/fbsync_test.php | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 fbsync/tests/fbsync_test.php diff --git a/fbsync/tests/fbsync_test.php b/fbsync/tests/fbsync_test.php new file mode 100644 index 00000000..676b74fd --- /dev/null +++ b/fbsync/tests/fbsync_test.php @@ -0,0 +1,53 @@ + GET, + "relative_url" =>"me/home?limit=$limit&fields=actions,link,id,created_time,application,attachments,updated_time,object_id,with_tags,comments{can_comment,comment_count},likes,message,message_tags,description,parent_id,place,privacy,shares&since=$last_updated" + ), + array(method=>GET, + "relative_url" => "me") + ); + + + static $GETRequest = '{"method":"GET","relative_url":%s}'; + var_dump($graph); + $graphURL = 'https://graph.facebook.com/v2.1/?batch=' . urlencode(json_encode($graph)) + .'&access_token=' . $access_token . '&method=post' + ; + + //Facebook API v2.1 + $graphData = json_decode(file_get_contents($graphURL)); + + //Facebook v2.1 Data + $posts = json_decode($graphData[0]->body); + + +*/ +?> \ No newline at end of file