Hallo zusammen,
für alle die aktuell den Bug haben: FB-Bug „Add Page Tag Dialog „
Hier mein kleiner Workaround um die App auf die Seite zu bringen.
Voraussetzung:
+ Rechte auf der Seite
+ App-Admin
+ Facebook-SDK (Javascript) geladen
Hello everybody,
at the moment i can’t add an app to a page with the „add page tag dialog“ on facebook. FB-Bug „Add Page Tag Dialog „.
This is my workaround:
Prerequisite:
+ Right on the site
+ App Admin
+ Loading Facebook SDK (Javascript)
function addAppToPage(name,appID){
FB.login(function(response){
FB.api('/me/accounts', function(response){
if (response && !response.error) {
$.each(response.data,function(k,v){
if(name.toLowerCase() == v.name.toLowerCase()){
FB.api(
"/"+v.id+"/tabs",
"POST",
{
"app_id": appID,
"access_token": v.access_token
},
function (response) {
if (response && !response.error) {
console.log(response);
}
}
);
}
})
}
})
}
,{scope:"manage_pages"});
}
// Load the SDK asynchronously
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// Die Funktion startet nach 2000ms
setTimeout(function(){
addAppToPage("YOURPAGE","APPID")
},2000);
Schreibe einen Kommentar