Instagram erreur when posting an ad - facebook

I'm getting an error " Instagram Invalid Advertiser Account :Erreur inconnue #3843002 ". How to correct it?
" Instagram Invalid Advertiser Account :Erreur inconnue #3843002 "

Related

facebook messenger api “(#100) No matching user found”

im using facebook sdk and i keep getting an error message “(#100) No matching user found” and i followed the instruction on facebook documentation but i keep getting this message i already check the user id who i want to send it to also i used already an static id for this to check if im getting the wrong id from senders conversation api. i don't know if this is a bug or am i doing it wrong, i already added messenger product on my app
FB.api('/'+id+'/conversations?access_token=' + token + '&fields=senders','GET',function(conversations){
FB.api('/'+id+'/messages?access_token=' + token ,'POST',{
'recipient' : {'id' : conversations.data[0].senders.data[0].name},
'message' : {'text' :'hello ' + conversations.data[0].senders.data[0].name},
},function(messages){
console.log(messages);
});
});
});

Problems with facebook api posting to company page using application id: (#200) The user hasn't authorized the application to perform this action

I am stuck with access rights in trying to post on facebook company page.
I have created an application and gotten appId and secret.
I have linked the application to the existing facebook page.
I have retrieved an accessToken for the appId.
But get the response: "(#200) The user hasn't authorized the application to perform this action."
Which user does the error statement refer to? the AppId user? The administrators of the page (me)? And where can I grant these missing rights?
I am trying to achieve that the post functionality is not facebook-user-dependent, but is company (or appID) dependent.
I am really confused about this...
Off course we could create a bogus user (kept in the company files) and post as this user - but that goes against the Facebook policy, and that is not the road we want to go down...
function FB_doPost(link, message, accessToken) {
console.info('doPost');
FB.api('/pageid/feed', 'post', {
access_token: accessToken,
message: message,
link: link
}, function (response) { if (!response || response.error) { console.info('error occured: ' + response.error.message) } else { console.info(' post id: ' + response.id) }; }
);}
In order to post to a Page "as Page", you need to do the following:
Authorize a Page Admin with publish_pages and manage_pages
Use the /me/accounts endpoint to get a Page Token for that Page
Use that Page Token with the /pageid/feed endpoint to post as Page
Make sure you know about the difference between Access Tokens, here are some links about that:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/

How can showing in my web, Facebook rating stars?

Well, I have one website where i'm using the Facebook Plugin (the typical box with your followers and posts)...How i can showing the Facebook Rating in the same box? I'm not found the option :S
It's this possible?
Thanks for help me! And sorry for my English ;)
Edit:
Thanks for the URL's in i'm found one example and i'm editing this. I've the following code:
function testAPI() {
console.log('Welcome! Fetching your information.... ');
FB.api('/1447162575539510/ratings', function(response) {
if (response && response.error){
console.log("ERROR: "+response.error.message);
}else{
console.log("RESPONSE: "+response.open_graph_story);
//console.log('Successful login for: ' + response.rating);
document.getElementById('status').innerHTML ='Thanks for logging in, ' + response.name + '!';
}
});
//FB.api("/410442505719113/ratings",function(response){
//if (response && !response.error){
//console.log(response.name);
//}else{
//console.log("ERROR : "+response.error.message);
//}
//});
}
But always give me the same error: ERROR: (#210) Subject must be a page. And i don't know for why, the profile is a page in facebook
Here´s what you have to do:
Create a Facebook App
Authorize a page admin with the manage_pages permission
Extend the User Access Token (from 2h to 60 days)
User /me/accounts with that Token to get an Extended Page Access Token
User /{page-id}/ratings with that Page Token to get the ratings
Some links for you, covering all those todos:
https://developers.facebook.com/
https://developers.facebook.com/docs/facebook-login/access-tokens
https://developers.facebook.com/docs/graph-api/reference/v2.1/user/accounts
https://developers.facebook.com/docs/graph-api/reference/v2.1/page/ratings
http://www.devils-heaven.com/facebook-access-tokens/

How to get user friends list?

How can I get the user friends list of the logged in user? I authenticate the user and request the permission using the server redirect approach, for example:
Response.Redirect("https://www.facebook.com/dialog/oauth?" + "client_id=" + "12345678" + "&redirect_uri=" + "https://www.myserver.com:44316/FaceBookLoginRedirect.aspx" + "&scope=user_status,email,user_friends" + "&response_type=token");
FB doesn't show the user the permission request dialog and doesn't return the data such as email and user_friends
any idea?
Thx

Trying to send facebook notification, results in "sorry, something went wrong" response

As from the title I am trying to use tha facebook notifications api. I have read the documentation and I am trying to do a POST to the graph like the one following:
String notificationURL =
"https://graph.facebook.com/" +
String.valueOf(facebookUserId) +
"/notifications?" +
"access_token=444146492324422|8LOOIj7xPT2LFlx14_3SqKCDgVc" +
"&href=https://apps.facebook.com/Nmctesting" +
"&template=#["+String.valueOf(facebookUserId)+"]! You have won!!";
the access token is the one returned from the graph query :
String appAccessURL = "https://graph.facebook.com/oauth/access_token?client_id=444146492324422"+
"&client_secret=[MYAPPSECRET]" +
"&grant_type=client_credentials";
I have tried to use the access token of the logged in user, who was the admin at that time, but It didn't work.
For any test that I do I get the html page as a response which states "Sorry, something went wrong"
what did went wrong?!
Thanks in advance!
Make sure your FACEBOOK_USER_ID is a valid facebook username. You may need to URI escape it first. If it's the correct username, https://www.facebook.com/FACEBOOK_USER_ID will be the user's facebook page, so try hitting it in a browser before you try anything else.