I'm trying to get the place ID from a business on google.
I've searched it in this widget but it does not show
https://developers.google.com/maps/documentation/places/web-service/place-id
I followed this site
https://www.launch2success.com/guide/find-any-google-id/
and I get returned this from my request, any ideas?
{
"error_message": "The provided Place ID is no longer valid. Please refresh cached Place IDs as per https://developers.google.com/maps/documentation/places/web-service/place-id#save-id",
"html_attributions": [],
"status": "NOT_FOUND"
}
Related
I need all google reviews for particular location but I am unable to use business api from google. Here is url for get request
https://mybusiness.googleapis.com/v3/accounts/account_name/locations/location_name/reviews
Now my question is what is the value for param account_name and location_name
How can I get that.
Please answer with sample location example
I think first of all you need to white list your google my business api for whatever project you are working on in your project as its private api. Google my business api will work on the locations associated with your account so make sure you verified the LOCATIONS from any account you know. Then you can try out the api call you mentioned in OAuthplayground.
Follow steps mentioned in below documentation URL to set it up:
https://developers.google.com/my-business/content/prereqs
After the setup and etc you will automatically understand the account id and location id.
Also few more urls you can go to understand it better.
https://console.developers.google.com (here you will setup your project)
https://business.google.com/manage (here you will add/can see the locations - for which you need reviews)
https://developers.google.com/my-business/content/basic-setup (Steps after completing the prereq)
https://developers.google.com/oauthplayground (You will test the my
business api here after approval)
When you make a request to https://mybusiness.googleapis.com/v3/accounts it gives you a list of accounts. On those accounts they have a field called name. That field is accounts/account_name.
{
"state": {
"status": "UNVERIFIED"
},
"type": "PERSONAL",
"name": "accounts/1337",
"accountName": "example"
}
When you make a request to https://mybusiness.googleapis.com/v3/accounts/account_name/locations it gives you a list of locations. On those locations they have a field called name. That field is accounts/account_name/locations/location_name.
{
"locations": [
{
"languageCode": "en",
"openInfo": {
"status": "OPEN",
"canReopen": true
},
"name": "accounts/1337/locations/13161337",
...
}
I am trying to build a Chrome extension and I want to get all the posts that people posted on the user's wall specifically on his birthday.
I tried to call through Facebook Javascript SDK, but it is not returning the posts that are posted by my friends on the birthday.
FB.api(
'/me/feed',
'GET',
{},
function(response) {
// Insert your code here
}
);
Rather, it is returning all the birthday posts in one post like this:
{
"message": "Belated happy birthday bhaiii.....",
"created_time": "2015-10-19T00:02:02+0000",
"id": "578828115566706_848912165224965"
},
{
"story": "Ritwik Jain and 40 others wrote on your Timeline.",
"created_time": "2015-10-18T03:59:39+0000",
"id": "578828115566706_848604468589068"
},
How do I get each post individually?
Thanks in advance.
As you found out, the /me/feed endpoint is what you need to use - with the user_posts permission, of course. Facebook puts birthday posts together as it seems, but there is no other way to get the posts. Meaning, there is no way to get the birthday posts separately.
Endpoints for the user wall: https://developers.facebook.com/docs/graph-api/reference/v2.5/user/feed
I am working on Facebook application (JS sdk), In this app user can post like/comment on a photo. For this activity, It is showing a like button at bottom of photo. But if user already liked particular photo then we don't show like button there. For this we need to know weather user already liked the photo or not. It is possible to know this using FQL
SELECT object_id,like_info,comment_info FROM photo WHERE object_id=343907262480651
And it returns a boolean flag data["like_info"]["user_likes"]
I am migrating my code from graph api v1.0 to v2.2. So FQL will is longer available.
I want solution in graph API 2.2 similar to user_likes flag. I searched a lot for this, but not getting what exactly i want. Is there any alternative way to achieve this?
Thanks.
To get the likes for an object, you make call to
/{object-id}/likes
If you want the total number as a field, you need to set the field summary=true
I'm trying to accomplish the exact thing. So far, I couldn't find any end point that will readily tell you whether the user has already liked the post or not. But one work around is to call the /{object-id}/likes end point that will return you something like below:
{
"data": [
{
"id": "808004209267865",
"name": "Kailey Nicole"
},
{
"id": "10204107012455593",
"name": "Brenda S. Coffelt"
}
],
"paging": {
"cursors": {
"before": "OTU1NzQ4ODQxMTIyNDEz",
"after": "MTAyMDQxMDcwMTI0NTU1OTM="
},
"next": "https://graph.facebook.com/v2.3/10151929326420059/likes?pretty=0&limit=25&after=MTAyMDQxMDcwMTI0NTU1OTM="
}
}
You can then easily look for the user id in this JSON array. If it exists that means the user likes the page otherwise not. However keep in mind that there can be pagination (in case of lot of likes), so you'd really have to keep using the next URL to exhaust all likes data.
I am trying to search Google+ accounts through the Javascript API but even when supplying fields param and telling it to retrieve cover photos it still doesn't retrieve it.
Example search API call with cover field selected
Any idea if this limitation is part of the Google+ search API? This doesn't seem to happen in the people.get calls.
The people search returns only limited information about the person. You need to take the ID returned from People search and call People get.
From the documentation: People: search
items[] list The people in this page of results. Each item includes
the id, displayName, image, and url for the person. To retrieve
additional profile data, see the people.get method.
People: get
If successful, this method returns a person resource in the response body.
"cover": {
"layout": "banner",
"coverPhoto": {
"url": "https://lh4.googleusercontent.com/-G93N-0rUMcU/U8z2FJW_eNI/AAAAAAAAKe0/zcIwm7NmPRc/s630-fcrop64=1,003a0000ffc4ffff/LindaLawtonGoogleplusCover.png",
"height": 528,
"width": 940
},
I have been getting like and comment counts per post of facebook page/group feed call by graph api separately using FQL but as version 2 of graph api released fql no longer working to serve purpose.
So i have to find new ways to get comment and like counts per post of page feed display. I will make a separate call to get comment and like counts per post of the fb page as it may not be possible to get things in same page feed call(or it is?).
So, searching through google, i found following way using graph api call -
..page_id/feed?fields=likes.limit(1).summary(true){id},comments.limit(1).summary(true)&limit=10
Is this the best and error free way?? Also besides id and summary fields i also get created_time, paging, likes data by the above call which is unexpected and redundant, how do i exclude these additional fields?
So please any FB employee show me light on what is the best way to retrieve like and comment count per post of page/group feed using graph api version 2.
If you want to retrieve Likes and comments count of a post on FB you can achieve this by using Id of the post Like this
..Your_Post_ID?fields=likes.limit(0).summary(true),comments.limit(0).summary(true)
the result will contain
Total numbers of likes of the post, total numbers of comments of the post, post ID and post created time.
The result will be like this
{
"likes": {
"data": [
],
"summary": {
"total_count": 550
}
},
"comments": {
"data": [
],
"summary": {
"order": "chronological",
"total_count": 858
}
},
"created_time": "2014-10-12T05:38:48+0000",
"id": "Your_Post_ID"
}