We receive "(#4) Application request limit reached" error when a page is showing the profile picture of a large amount of users.
Does it happens just because of referring the user's profile picture via graph api? e.g. "https://graph.facebook.com/{user-id}/picture"
If we will use the direct picture link (e.g. "http://profile.ak.fbcdn.net/...") and update it using the real-time updates the problem will be solved?
Thanks
If you are doing too many server calls to facebook app at once, you have a fair chance to get the error. Please check if getting the direct link is permitted in the facebook terms and conditions for platforms. Or else you can store the picture when someone connects through facebook in your server, but again, facebook changed privacy policy recently, so please check with that too.
Related
So I made a bot using Bot Framework v4 Nodejs SDK and while the bot was healthy and running just yesterday. Today, something peculiar happened in the bot, only through facebook channel.
So whenever someone sends a message in the bot through messenger: the from object contains {"id":"3012023272144004","name":"FACEBOOK_USER_NAME"}
this is displayed in my code:
console.log("FROM DATA : " + JSON.stringify(stepContext.context.activity.from));
today it only displays {"id":"3012023272144004","name":" "} where the facebook name of user is always empty (and I assure you that users,that I tested, has a facebook name)
also whenever I request for facebook firstname and lastname using graph API I have this response
{"error":{"message":"(#80006) There have been too many messenger api calls to this Page account. Wait a bit and try again. For more info, please refer to https:\/\/developers.facebook.com\/docs\/graph-api\/overview\/rate-limiting.","type":"OAuthException","code":80006,"fbtrace_id":"AZp9laYMB2IGha-WAPYDBXH"}}
I retried it for the whole day, and nothing happened. I checked the dashboard for rate limit but all I can see is 0% limit used (the app is exclusively connected to my page and the page is exclusively connected to my app. thanks for the clarification)
and this never happened before, I always get the firstname, lastname, id and even profile picture - sample body response from previous calls:
{"first_name":"Nightshade","last_name":"Villabrille","profile_pic":"https:\/\/platform-lookaside.fbsbx.com\/platform\/profilepic\/?psid=2951340481545239&width=1024&ext=1586604925&hash=AeTsZ60vo4npjquO","id":"2951340481545239"}
I really have no idea where to ask this issue. Is this framework issue? facebook graph issue? or bot channels issue? Thanks!
---I'll provide code or respond to anything that I need to clarify. Thanks!
PS: Even other channels responds like this on email: {"id":"apvillabrille#up.edu.ph","name":"Villabrille, Aleimar P."} and webchat: {"id":"3012023272144004","name":"Web Chat User","role":"user"}
The Azure Bot Service change log is not currently available to the public, and the problem you experienced may not have had an entry in the change log anyway. It's unclear if the problem was on your end or Facebook's end or Microsoft's end, and if it was on Microsoft's end then it was more likely to have been a random outage than an actual code update. If your production bot experiences problems like this in the future then you can submit a support request through your bot resource in the Azure portal.
You might also consider engaging with the Facebook developer community: https://developers.facebook.com/docs/messenger-platform/useful-resources
Anyone know what is the reason for this Facebook API error?
This is appearing sometimes while user is posting by /feed call.
"error":{"message":"Permissions error", "type":"FacebookApiException", "code":200, "error_subcode":1376025
Posting to a user's wall is not a default permission and as such you're probably trying to post without first checking they have granted to permission to do so. If you're finding multiple users are causing this error, consider only asking for permission when your app needs it. From the Facebook Graph API docs:
For cases where someone has granted some permissions but not others,
only prompt for missing permissions at the point at which they are
needed. For example, if your app posts stories to Facebook, only
request publish_actions when they ask to publish a story.
Alas, I could be way off - but that's what I think is happening based on your description. There isn't much else that could be causing that if it works sometimes and not others, given your error message is an exception from the Facebook API itself.
If you are using a test account along with the API for testing on Facebook and you are trying to post Facebook content such as a link to a video that has been uploaded to Facebook, then you will get this error.
In my case I was using the API to post this video: https://www.facebook.com/LADbible/videos/the-turkey-whisperer/4699159626797857/ to my test user accounts facebook page and I was getting that error. When I used a different link facebook allowed the post to go through.
This may not be a fix for you but maybe for anyone else coming across this permissions error.
I'm currently toying with the Facebook Graph Api and have been able to get some interesting results, I would like to be able to post to one of my Facebook App users pages. They have authenticated the app and confirmed the ability for my app to be able to post on there wall. I know there is the can_post check using FQL, but I haven't seen any information on this using the Graph API. Is there a possible check to make so I can see if I have the ability to post on there wall?
can_post
https://developers.facebook.com/docs/reference/fql/user/
This settings is actually a setting of the timeline:
This setting only affects the viewers of the specific timeline and does not apply to the owner of the timeline.
can_post - bool - Whether or not the viewer can post to the user's Wall
Beyond this settings, by authenticating an application and giving it certain publishing permissions, the application, using it's per-user per-app access token will be able to perform actions on behalf the actual user. Actions will be attributed to the user even though it is the application that initiated and published these stories.
To answer what I assume is your underlying question - your application, given the appropriate permissions, will always be able able to publish a story to the users timeline. The act of giving an application any permissions is the same as allowing the application to act as you and access everything you would be able to access. This includes posting a story to your own timeline (even if no other user would be able to).
Our desktop application integrates with Facebook using the desktop app workflow and for approx. 18 months has been working without any problems. However, we are starting to get reports from some users that they cannot get past the login process.
When the login is successful Facebook should be attaching the access_token to the redirect_uri. Our application detects this and moves the user to the main part of our Facebook integration. What appears to be happening in some situations is that the access_token parameter is missing which causes our application to leave our embedded browser window open with the following message from Facebook:
"Success
SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone."
What is strange is that this does not occur with all Facebook accounts and which Facebook accounts it occurs with seems to be changing. For example, we had a report of this approx. 1 week ago but could not duplicate it with my own Facebook account or with a colleague's Facebook account. Today, I still cannot duplicate it with my own Facebook account but my colleague now gets the problem.
The URL our code sends to Facebook is:
https://graph.facebook.com/oauth/authorize?client_id=xxxx&redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup&scope=read_friendlists,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_events,friends_events,user_groups,friends_groups
Reading the latest API documentation it looks like they recommend a different way to connect which we have also tried:
https://www.facebook.com/dialog/oauth?client_id=xxxx&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=read_friendlists,user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_events,friends_events,user_groups,friends_groups&response_type=token
To rule out our application as the cause we have tried these URLs directly within a web browser. What we find is that when using my Facebook account the browser re-directs to the success URL that includes the access_token parameter but when using my colleague's account the browser re-directs to the success URL that includes the access_token and then immediately re-directs again to the success URL without the access_token.
so... As far as we can tell this is either:
a) A change to the API which we cannot find documented anywhere
b) A bug in Facebook
c) Something that is now controlled by the user's Facebook security settings
Is there anybody who could explain why Facebook is acting differently with different accounts and how we can go about fixing this?
Thanks.
Kevin.
I have the same problem in my desktop applications.
And I just solve it with careful reading in ht*ps://developers.facebook.com/docs/howtos/login/login-for-desktop/. The solution is to change redirect_uri from ht*p://www.facebook.com/... into ht*ps://www.facebook.com/...
Hope this will help you just like it help me
NB:
change ht*p into http
sorry i have to change the http into ht*p so that i can post the answer.
Should I hot link to Facebook images when using their API or copy them to my server?
What does Facebook want me to do?
Policy 2.2 states:
"You may cache data you receive through use of the Facebook API in
order to improve your application’s user experience, but you should
try to keep the data up to date. This permission does not give you any
rights to such data."
You are free to cache the data on your side if you would like, but there was a post in their forum about this which stated hot-linking would be better. If its just profile pictures, and not album photos, just use the graph address photo.
Sure you can link to facebook images:
http://graph.facebook.com/4/picture
Keeping images on your server has considerable overhead and also it is very difficult to up to time.
The only drawback of linking to facebook images is slightly delay while user load your page