Multiple request ids - facebook

In the request 2.0 documentation, they mention that the app can get request_ids, which is a comma delimited list of Request IDs that a user is trying to act upon.
I was wondering if someone can give an example when multiple ids will arrive. Usually for each request the user sees a single notification so how come several requests might be combined to a single call?

All request are grouped in left pane, showing the number of them next to app name, aren't they? It seems only logical that you get them all if you click on the app name there.

Related

Facebook Developer APIs - Trying to fetch all the campaigns, Adsets and Ads

This is what I'm trying to do -
The first GET request is to https://graph.facebook.com//<ACT_ID>/campaigns, which successfully returns me all the campaigns (Ofcourse I've handled pagination using the cursors provided)
The next step I perform is, for every campaign ID, I make a GET request to https://graph.facebook.com//<CAMPAIGN_ID>/adsets to fetch the respective adsets.
Here is where things go wrong. I get back an error which says limit (#17) User request limit reached after a few requests.
I have also tried using batch requests. But it appears as if the batch requests are in turn making individual multiple calls internally, which is again ending up in the request limit error.
Can anyone help me figure out how I can achieve this ? Bypass the limit or perhaps a different approach.
Thanks.
Please let me know if you need clarification on my question.
[UPDATE] : I have tried looking at the metrics from the header of an GET insights call. The CPU usage/call count/total time are way below the limits specified in the documentations. I have no idea why the request limit error is showing up.
I have found a way to fetch campaigns, adsets and ads in a single call.
https://graph.facebook.com/<ACT_ID>/campaigns?fields=id,name,adsets{id,name},ads{adset_id,name}
This will return an array of campaigns, with each campaign having arrays of adsets and ads that belong to it.
Now that I got the data, I can easily parse it according to the format I want which is each element in the array of campaigns having a array of adsets that belong to it. Each element in this array of adsets having an array of ads that belong to it.

Count total XMPP session in multiple tabs/window

I also have a same problem as mentioned here. But, I went ahead with the approach of randomizing my resource so as to maintain the session in multiple tabs/windows. Also, I get carbon message (LINK) in all tabs/windows.
My only concern is, I'm saving chat history using (store.js) in my browser. And if 5 tabs are opened, then message gets saved 5 times. Which is a repeat.
How can I determine to how many tabs/windows the message was sent?
Based on the count I want to apply my logic to save the message only once.
You can count the number of tabs from Javascript because, you are sandbox to your own tab for security reason.
However, what you can do is ensure your client have unique id on the message tag and you can check on write if your message has already been written in your store or not.

Faster API for downloading 'just IDs' from O365 Exchange?

I am connecting to O365 Outlook Mail Get Messages REST API, e.g.
GET https://outlook.office365.com/api/v1.0/me/messages?$top=50&$select=Id
and I am trying to retrieve just IDs so I can determine if messages have been deleted from my inbox (e.g. diff'ing against a previous ID list). I'm checking #odata.nextLink to perform a synchronous series of REST calls until complete.
I'm finding that this call has roughly the same performance as downloading the full message (e.g. without the $select clause), aka ~50 Ids / second. I'd like to know if there is a more efficient / quicker way of retrieving just a list of Ids of all messages in the Inbox. A call to retrieve a list of deleted/moved Ids from a point in time (e.g. tombstones) would also work, something like:
GET https://outlook.office365.com/api/v1.0/me/messages?$top=50&$select=Id&$filter=DateTimeTombstone gt 2014-09-01T00:00:00Z
Thanks!
No, currently there isn't. Sync is on our radar to add though, which sounds like it might help your scenario.
Don't know about the REST API, but EWS lets you sync any Exchange folder - this way you will know which items were created/modified/deleted without loading all items in the folder - see https://msdn.microsoft.com/en-us/library/office/Ee693003(v=EXCHG.80).aspx

Facebook Graph API Data Incorrect

Small problem here. I have an event created on Facebook and am using the Graph API to get the number of attendees.
I get the list of attendees with PHP from https://graph.facebook.com/EVENTID/attending?access_token=TOKENHERE and it returns a list of names.
However, the number of attendees is about 6 people lower than what is shown on the Facebook event page. Why would these numbers not match? Is there something in particular I'm supposed to do in the code to get the entire list?
As answered in the comments:
This discrepancy is probably down to a number of the attendees having opted out of Facebook Platform, which means their data isn't passed to apps via the API. Can't be 100% sure without the Event ID, but its a likely reason. – Simon Cross
From the Graph API, the people who have not joined the event will not show up under /{eventid}/attending, you need to add in the users who are returned in /{eventid}/not_replied. The not_replied set seems to be a special set in the GraphAPI.. and if you look at the docs, there is a mention of only people who have joined the event.

Using GA Data Export API to Get All UA's

I am using the GA Data Export API to interact with Google Analytics and I'm making a lot of progress, I am using this URL Endpoint initially to pull all the profiles under an account:
https://www.google.com/analytics/feeds/accounts/default
This URL retrieves each GA ID (profile) and each UA. One thing I've realized is one account can contain multiple UAs and when this happens, this request pulls all profiles. We have a client who has about 115 profiles under like 10 different UAs, and the request takes about 30 seconds for the initial request (and then I believe it must be cached, because it speeds up considerably after this, but then the next day the same thing occurs).
Is there a way to get a list of UA's without pulling the profiles? This way I can query the UA specifically for the profiles instead of pulling each one.
Any advice on this would be really helpful!
Thanks
UPDATE: Here's some documentation on the specific call I am using right now:
http://code.google.com/apis/analytics/docs/gdata/gdataReferenceAccountFeed.html
UPDATE 1: I have found some interesting information in the docs
Once your application has verified
that the user has Analytics access,
its next step is to find out which
Analytics accounts the user has access
to. Remember, users can have access to
many different accounts, and within
them, many different profiles. For
this reason, your application cannot
access any report information without
first requesting the list of accounts
available to the user. The resulting
accounts feed returns that list, but
most importantly, the list also
contains the account profiles that the
user can view.
So this means that you have to use the default accounts call to get these back? Surely, somebody has had this issue before?
So apparently, you can query the account if you know the UA-ID, however there is no way to get back a list of only UA IDs.
One way you can do it is have the user enter their own UA ID instead of having them choose one; not as user-friendly as it could be but better than making the user wait 30 seconds!