Missing items in Notifications response - facebook-graph-api

I'm trying to retrieve the list of all notifications using FQL. I have manage_notifications permission. If I do a query, like:
SELECT notification_id, sender_id, created_time, updated_time, is_unread, title_html, title_text, href, icon_url from notification where recipient_id = me()
it works. But the returned list is missing some items, seemingly at random. Some notifications that are present on the Facebook website just don't appear in the output. I can't spot any pattern in which ones are being skipped. But if I use the regular Graph API to call /me/notifications?include_read=1 exactly the same entries are missing.
I'm getting the same result whether I call from my code or using the Graph Explorer. What's more, if the skipped notification is unread, I can query the unread count and get "1", even though the notification in question does not appear in the list.
Does anyone have any idea what might be wrong here?

I think this is a bug, possibly related to newer notifications from Timeline etc. You should file a report in the Facebook Platform Bug Tracker and link back here to let everyone know where the issue is being tracked.

Related

Troubleshoot when and why `Subscription Filter` of a log group is deleted

I can see that the Subscription Filter of a log group is deleted and want to know when and how it got deleted.
I looked into cloud trail but not able to get any DeleteSubscriptionFilter events there. Only events available there is DescribeSubscriptionFilters but that was not much use, at least I was not able to get much information from there.
Thanks in advance

Identifier field are not included in Activities: list Meet report

Good day everyone,
was trying to use the Admin SDK Reports API to get info about Google Meet.
want to see who attended and how long does each person in the conference.
However, I cannot seem to get the email address of each attendee instead I only get the display name.
tried the fields option in API explorer to include the Identifier but got an error instead. Also, don't where or if there is a documentation about option Fields.
Please see attached image
If I set the fields empty I got a successful result but can't see the Identifier field which supposedly has the email address of the attendee.
My goal is to have this displayed in the result
Hopely got the answer right,
Thank you
The documentation specifies:
identifier_type
email_address
The participant's email address for in-domain participants.
This means that you are not allowed to see the emails of domain-external participants.
I assume it is implemented this way for safety reasons.

Facebook Graph API 2.1 feed attachments

According to Facebook Platform Changelog
/v2.1/{post-id} will now return all photos attached to the post: In previous versions of the API only the first photo was returned with a post. This removes the need to use FQL to get all a post's photos.
Though this statement is applicable only for separate API calls per post that looks follows:
https://graph.facebook.com/v2.1/{post_id}?fields=attachments
Since I need to retrieve all possible data that user posts to timeline, I use corresponding feed edge to do so.
https://graph.facebook.com/v2.1/me?fields=feed
So when I make a post with more than one picture attached to it, retrieved API response doesn't reflects that (and as I understand it's is per design). However I found that Graph API Explorer allows to choose attachments edge while constructing feed query that in this case appears like this
https://graph.facebook.com/v2.1/me?fields=feed{attachments}
but execution of such request triggers "Unsupported get request" exception.
Summing it up, the whole issue with the approach to make separate API calls for pictures is that it will dramatically increase number of calls which in turn not only decreases overall performance of the processing algorithm, but also leads to failing API call limits restrictions that in my case is unacceptable.
So I'm curious, is there any possibility to retrieve all post attachments (i.e. pictures) while working with feed edge or any alternative approach?
Thanks.
This should work.
me/home?fields=attachments,<other stuff>
The issue eventually resolved itself.
I found that Graph API Explorer allows to choose attachments edge while constructing feed
query that in this case appears like this
https://graph.facebook.com/v2.1/me?fields=feed{attachments}
but execution of such request triggers "Unsupported get request" exception.
It seems like non-working attachment edge for feed was unimplemented feature or a bug, because, surprisingly, now all attachments are retrieved successfully as subattachments collection.
Thanks, everybody.

A way to bypass the per-ip limit retrieving profile picture?

My app download all the user's friends pictures.
All the requests are of this kind:
https://graph.facebook.com/<friend id>/picture?type=small
But, after a certain limit is reached, instead of the picture I get:
{"error""message":"(#4) Application request limit reached","type":"OAuthException"}}
Actually, the only way I found to prevent this is to change the server ip (manually).
There isn't a better way?
For the record:
The limit is related to the Graph Api only, and the graph.facebook.com/<user>/picture url is a graph api call that returns a redirect.
So, to avoid the daily limit, simply fetch all the images url from FQL, like:
SELECT uid, pic_small, pic_big, pic, pic_square FROM user WHERE uid = me() or IN (SELECT uid2 FROM friend WHERE uid1=me())
now these are the direct urls to the images, for eg:
http://profile.ak.fbcdn.net/hprofile-ak-snc4/275716_1546085527_622218197_q.jpg
so don't store them since they continuously change.
If it's needed for an online app better way not to download those images, but use an online version, there is couple of reasons for doing so:
Users change pictures (some frequently), do you need an updated version?
Facebook's servers probably faster than yours and friends pictures probably cached within browser of your user.
Update:
Since limit you reach is Graph API call limit, not the image retrieval, another solution that comes to my head just now is using friends connection of user in Graph API and specifying picture in fields argument, eq: https://graph.facebook.com/me/friends?fields=picture, this will return direct URL-s for friends pictures so you can do only one call to get all needed info to download the images for every user...

Amazon Product Advertising API: XXX is not a valid value for BrowseNodeId

I am using the Amazon product Advertising API to fetch the product categories. For US categories it is working.
But using browse nodes from different sites I get the following error:
"569604 is not a valid value for BrowseNodeId. Please change this value and retry your request."
I got the browse-nodes from the following site:
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?BrowseNodeIDs.html
Where is the problem?
Thanks for your help!
This is an error that happens pretty regularly with the Products API, but not because the BrowseNodeId does not exist. Rather, the API intermittently craps out and returns this error. If you run it again, it will probably return the node correctly.
The way I have gotten around this limitation is to wrap the call in retry code.
Edit.
I tried running this BrowseNodeId, and indeed, it is invalid. The BrowseNodeIds change regularly, and because this is a german browse node you may not be able to access it from the US.
However, according to this, your BrowseNode (Electronics, DE) should be available in the US:
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/APPNDX_SearchIndexValues.html
You can test browse nodes at this url:
http://www.amazon.com/exec/obidos/tg/browse/-/$N/
where $N is the browse node.