Link URL data missing for some creatives in Facebook api - java

We opened issue about link url data that missing for some creative in facebook api , and we received answer that there are two ways to create an ad creative and the second one seems to have been created using an existing post ID, to get the link to the second ad we should call to {post_id}?fields=call_to_action .
Is there a way to get call_to_action data for multiple post IDS?
I have searched in the docs and didn't find way to do so ..

Is there a way to get call_to_action data for multiple post IDS?
?ids=post_id_1,post_id_2,...&fields=call_to_action
You can request data for up to 50 objects in one go this way.

Related

Foursquare Venue API returning empty venue list

I am working on the FourSquare venue API.
The following API link was giving results until this morning at 3 AM:
https://api.foursquare.com/v2/venues/search?ll=-6.21944223,106.80315059&intent=browse&radius=30&client_id=XXXX&client_secret=XXXX&v=20180512&m=foursquare
but now there is an empty venue array with status code 200. There is no update on the developer website.
Please help me understand why this is happening. Thanks in advance.
I had a similar problem with my app. Up until a couple of weeks ago we were able to make requests to the Foursquare api without specifying category ids. By doing this all place categories were considered. But now if you ommit categoryId no place is returned at all. I don't know if this is a bug on the Foursquare api or just a feature change (a VERY BREAKING change).
While we don't know the real answer, try adding a "categoryId" to your request, such as:
https://api.foursquare.com/v2/venues/search?
client_id={YOUR_CLIENT_ID}
&client_secret={YOUR_CLIENT_SECRET}
&v=20130815&ll={LATITUDE},{LONGITUDE}
&limit=50
&intent=browse
&radius=50
&categoryId=4d4b7104d754a06370d81259,4d4b7105d754a06372d81259
(the indentation on the URL above is just for legibility, you should pass this URL as a single line when doing your request)
As #FelipeFerri suggested, I have added following parameter in API and it start giving the result.
https://api.foursquare.com/v2/venues/search?ll=-6.21944223,106.80315059&intent=browse&radius=30&client_id=XXXX&client_secret=XXXX&v=20180512&m=foursquare&&categoryId=4d4b7104d754a06370d81259,4d4b7105d754a06372d81259,4d4b7105d754a06373d81259,4d4b7105d754a06374d81259,4d4b7105d754a06376d81259,4d4b7105d754a06377d81259,4d4b7105d754a06375d81259,4e67e38e036454776db1fb3a,4d4b7105d754a06378d81259,4d4b7105d754a06379d81259
Thanks
Same thing happens to me. I've changed the API version (v) also without any

Reading a lot of data from the internet

I am currently working on a project for my portfolio. I having a little trouble trying to find the right solution to this problem mainly because I have never tried it before.
I am using a free API service that I found online. I have created the database to match all the information, and not I just need to download the information and parse into my application.
I have parsed data from the API (JSON) and into my database. A couple of suggestions that I have found is reading 10 records at a time, but I want to try reading everything at once and then updating accordingly (let us say every 24 hours).
The APi I am using is the a free Game of Thrones API and below is the list I want of about the URL is formed to access each part data as I move through it.
https://anapioficeandfire.com/api/characters/
https://anapioficeandfire.com/api/books/
https://anapioficeandfire.com/api/houses/
At the end of the each of these URLS is a number that indicates the record number that I am trying to get. I have done this before while get information from a single page, and the page contained multiple JSON object. This time I need to move through multiple pages to get the single object on that page.
To give you an idea of the steps that I am looking for :
Go the page
Download the Information
Move on the next page
Break when there when I have reached the end.

Extract email id from place details that have website

How can i extract email id based on the website that i have got from Place Details using Google maps API.
I want to extract the generic email id from these place details or the website. I have attached a screen shot to show what i have. I am using open Refine.I am able to parse the phone number but can't parse email id's as its not present in these place details but i can see it on the website.
Thank you in advance.
This is the code i am using -
"https://maps.googleapis.com/maps/api/place/details/json?placeid=" + cells['PlaceID'].value + "&key=AIzaSyCSp-f-_FWHw8jfNFF9yd7mgUxaX-DZo8g"
According to the google maps places API this is not something that can be returned from the API. I believe that Google does not want its API to be used as a source for spamming companies. Based on that, I can't think of any legal option that would give you this email.
The only solution that I can think of would be to get the URL attribute from google maps API result and from then scrape the page and hope that there is a way to find the email address in the HTML code, but :
I don't think that google would present it in a easily scrappable way;
I believe it would go against terms of use of Google.
So to summarize I don't think there is an easy and legal solution to your question.

Get data from specific webpage

I need to get data from table id="maintable" from website "http://trackinn.az/GeoLoc/reports.aspx?login=ho&password=ho". I tried many methods some of them worked for other websites but not for this one. Could someone help pls?
Thanks.
You cannot get data from that table. It is being dynamically created by javascript (AJAX particularly). And I don't think there is any api wich can process javascript.
It would be possible to get data if it was a static file or the part you want would be static, but it is not.
If you are using this site to get geolocation, then use google geocoding api for this. it would be better option.

Dynamically update google maps with received longitudes and latitudes

I've written a java applet which sends longitudes and latitudes trough POST requests. I need to write a server page which will receive this data and dynamically shows a google map with the received points on it. (php/etc...)
I don't know how to start with this, because I really don't know what to do first.
https://developers.google.com/maps/documentation/imageapis/ has all the information you need.
So you simply need to get a server page to recieve your POST data, parse the longitude and latitude and then get the image result from the URL below (look inside the src attribute).
Should be fairly obvious what all the parameters are, zoom level on google maps and the size of the map in pixels. Alternatively if you just want this map displaying on a webbrowser you just output the img tag shown below
<img src="http://maps.googleapis.com/maps/api/staticmap?center=-15.800513,-47.91378&zoom=11&size=200x200&sensor=false">
EDIT:
The URL will dynamically generate the map each time you send a POST request. If you need the data to continuously change then maybe using POST requests isnt the best way to do it. POST is best used for data which you want to send off to a server then do something with (generate a single map etc).
As an example...
The user wants a map of where a particular street is that they have clicked on
>
Send POST request
>
Get the map using the Google Maps URL and send this back/output to a webpage.
As an alternative you might want to look at the various Maps APIs on the site. A better link for this would be https://developers.google.com/maps/
It's not quite clear what you are aiming to do so providing an example usage would help with a better answer.

Categories