I have created a facebook app to install on facebook pages. I followed two methods to install app,
1.
<script type="text/javascript">
var pageUrl= "https://graph.facebook.com/{PAGE_ID}/tabs?app_id={APP_ID}&method=POST&access_token={PAGE_ACCESS_TOKEN}&callback=?"
$.getJSON(pageUrl, OnCallBack);
function OnCallBack(r, s) {
var html = "";
if (s == "success" && !r.error) {
for (p in r) {
html += p + ": " + r[p] + "<br />";
}
} else {
html = r.error.message;
}
$("#dv").html(html);
}
</script>
Method2: Using FB.api() FB.api('Page_id/tabs', 'POST', { app_id: appId, access_token: accesstoken }, function (response)
{
if (!response || response.error)
{
alert('Facebook add app error ' + response.error);
}
else
{
alert('App has been added');
}
});
Method 3 : Tried by using graph api explorer by passing the following URL:
https://graph.facebook.com/PAGE_ID/tabs/create/?app_id=YOUR_APP_ID&access_token=YOUR_TOKEN
All the above methods, resulted
(#210) Subject must be a page error. .
Please suggest some solution.
Thanks
Vijaya.
vijayabhaskar