Skip to content

Instantly share code, notes, and snippets.

@RhinoLu
Last active October 13, 2015 08:48
Show Gist options
  • Save RhinoLu/4170147 to your computer and use it in GitHub Desktop.
Save RhinoLu/4170147 to your computer and use it in GitHub Desktop.
Facebook tag photo
// 授權需求:publish_stream,user_photos
var _array:Array = [];
for (var i:int = 0; i < postArray.length; i++)
{
_array.push( { "tag_uid":postArray[i].id } ); // tag_uid < 文件似乎沒有
}
var postObj:Object = { };
//postObj.to = postArray[0].id; // 單人
postObj.tags = JSON.encode(_array); // 多人
var far:FacebookAuthResponse = Facebook.getAuthResponse();
postObj.access_token = far.accessToken;
Facebook.api(photo_id + "/tags", onTagPhotoComplete, postObj, "POST");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment