Date_start and date _stop default api fb - api

I have the following url where I am using campaigns, I want to request the information per day but even if I put "date preset" or "time range" I always get date_start and stop as seen in the image, my question is: it possible to remove date_star and date_stop or why does it default? and if it can be removed, how can you request the information per day?
My url :
https://graph.facebook.com/v6.0/act_id/campaigns?&fields=id,status,objective,insights{account_name,campaign_name,adset_name,impressions,reach,clicks,frequency,unique_clicks,cost_per_inline_post_engagement}&limit=100&date_preset{today}&access_token=" "
What i get is:
date obtained when making the request

Related

OAuth, Scraping data - How to calculate device_id & device_token?

I'm trying to scrape olx.pl website. I want to get a phone number from advert. Example advert is here: https://www.olx.pl/d/oferta/mieszkanie-pokoj-do-wynajecia-CID3-IDG2hIu.html
You need to click: Zadzwoń / SMS to check phone number.
As you can see, the phone number is generate in two steps.
First is making request to: https://www.olx.pl/api/open/oauth/token/
This is POST request. Post params which is needed to make this request:
client_id - this is into HTML source (CTRL+U in your browser)
client_secret - this is into HTML source (CTRL+U in your browser)
grant_type => 'device' (always the same value)
scope => 'i2 read write v2' (always the same value)
device_id - this param I need to calculate, but I don't know how
device_token - this param I need to calculate, but I don't know how
Second step is making POST request for: https://www.olx.pl/api/v1/offers/621150874/limited-phones/
Here is using everything from FIRST STEP.
My question is: How I can calculate device_id and device_token for first request? Into HTML source these params not exist.

How to get maximum number of tweets on an user

i have this code
("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser.'&count=500'
But it is giving me only 200 records , I found in twitter document that it will give 3200 tweets.Is i am doing wrong what should i do to get that much tweet.
Since there is no page system in twitter 's API, to go throught timelines, you must use the "max_id" parameter.
Here is an helpful link that explains how to work with timelines with nice illustrations: https://dev.twitter.com/rest/public/timelines.
Edit: here is how you do it.
"To use max_id correctly, an application’s first request to a timeline endpoint should only specify a count."
Make your request "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser.'&count=500 (you can put 200).
Then when you get all your data, " keep track of the lowest ID received" and use it as parameter (the same way you do for the count) for your next request. it will give you the 200 next posts with a lower id than the one you specified. Do it again until you reach the end.

VSTO accessing date of message as entered in the header

in VSTO I want to access the date of a sent message as it appears in the recipient clients header. Sent Items return an empty transport header (for obvious reasons) however I can't find a date to match the date that a non exchange recipient system would get from the message header.
I've tried:
CreationTime();
PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x30070040").ToString(); //MAPI creation time
.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x30080040").ToString(); //MAPI last modification time
.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x0E060040").ToString(); //MAPI Date Message Delivered
But none of them match the actual Date: that appears in the header on the recipient end. Taking into account timezones, etc. the Date field is a couple of seconds off.
Any ideas on how to access the date of a sent item as it appears to the clients? I would have expected date of delivery or date of creation to match.
Try PR_CLIENT_SUBMIT_TIME (DASL name http://schemas.microsoft.com/mapi/proptag/0x00390040). Also keep in mind that OOM always rounds the date/time properties to the nearest second.

Eventfinder API: start_date parameter doesn't work

I am trying to get results from the Eventfinder API. It's a REST based service.
I want to get events from tomorrow.
But instead I will always get events from today (probably because default time is now).
Let's assume we have Friday the 2014-03-28 and I want events of Saturday the 2014-03-29.
When I request this url:
http://api.eventfinder.co.nz/v2/events.xml?rows=1&start_date=2014-03-29 I am getting events of the 2014-03-28.
For me it's not clear how to set the time, after I read the documentation on Eventfinder.co.nz
Now I have found a solution by myself.
It's important setting the end_date parameter too. If the end_date is not set, the event must happen at the current date AND a the date where the start_date is set.
This is an example usage, getting events of Saturday the 2014-03-29.
http://api.eventfinder.co.nz/v2/events.xml?rows=1&start_date=2014-03-29&end_date=2014-03-30

Sharethis api top shared urls

I'm working on building a block on my site that contains the top 5 most shared urls on my domain via the sharethis api, I've been testing it and have gotten some unexpected results...
when I check the domain statistics api, I get the expected results:
request:
http://rest.sharethis.com/analytics/V2/getDomainStats.php?domain={my-domain}&pub_key={my-publisher-key}&access_key={my-secret-key}
response:
{"status":"SUCCESS","from_date":"20120620","to_date":"20120627","data":
{"domain_summary":[{"clicks":1092,"shares":134,"traffic":1393,"date":"06\/20","channel_stats":
[{"shares":86,"clicks":404,"traffic":412,"channel":"facebook"},
{"shares":25,"clicks":617,"traffic":898,"channel":"email"},
{"shares":12,"clicks":0,"traffic":0,"channel":"fblike"},
{"shares":7,"clicks":42,"traffic":31,"channel":"twitter"},
{"shares":3,"clicks":0,"traffic":0,"channel":"plusone"},
{"shares":1,"clicks":0,"traffic":0,"channel":"pinterest"},
{"shares":0,"clicks":17,"traffic":19,"channel":"blogger"},
{"shares":0,"clicks":12,"traffic":33,"channel":"google_bmarks"}]}.....
I've truncated those results obviously since they go back for a week...
when I try to find out what urls are the most active from my domain:
request:
http://rest.sharethis.com/analytics/V2/getTopUrlStats.php?domain={my-domain}&from_date=2012-06-27&to_date=2012-01-01&pub_key={my-publisher-key}&access_key={my-secret-key}
response:
{"status":"SUCCESS","from_date":"20120627","to_date":"20120101","last_batch_date":"20120626","data":{"top_urls_summary":[]},"today":""}
Obviously this is not what I'm looking for, I have the clicks and on the sharethis site I can go to my metrics and view the info I'm looking for with no problem, but the api is not answering with any data. I have tried changing the date range or omitting it completely (which for some reason returns an empty data set) to no avail. Has anyone else run into a similar problem?
Ok Sharethis support finally got back to me about the problem:
According to sharethis api :
To Date End date for data. Note: date must be in yyyy-mm-dd format. Default is 7 days ago.
From Date Start date for data. Note: date must be in yyyy-mm-dd format. Default is 'today'.
These are backwards, that's 1 reason why my call wasn't working, "To date" should be the more recent date when defining the date range... the "defaults" don't work so you must enter both values, and when you enter todays date as the "To Date" it may return "collection failed", so best to start with yesterday