Permalink
Browse files

New method updatePostVisibility added

  • Loading branch information...
1 parent ef0f782 commit 9942f9387df9620e918c6cbd09f0896cf1c39c5a Benoit Hediard committed Mar 28, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 sdk/FacebookGraphAPI.cfc
View
@@ -875,5 +875,18 @@ component extends="FacebookBase" {
result = callAPIService(httpService);
return result;
}
+
+ /*
+ * @description Update post visibility (show/hide in timeline)
+ * @hint Requires a page accessToken
+ */
+ public Boolean function updatePostVisibility(required String postId, Boolean hidden = false) {
+ var httpService = new Http(url="https://graph.facebook.com/#arguments.postId#", method="POST", timeout=variables.TIMEOUT);
+ var result = {};
+ httpService.addParam(type="url", name="access_token", value=variables.ACCESS_TOKEN);
+ httpService.addParam(type="formField", name="is_hidden", value=arguments.hidden);
+ result = callAPIService(httpService);
+ return result;
+ }
}

0 comments on commit 9942f93

Please sign in to comment.