How to get a number of Google Plus +1 for a URL of post - google-plus

I want to get a number of Google+ +1 for an URL of a article post.
For example I want to get a number of G+ like of Beautydea Magazine.
Is there a way to add my URL post for a specific URL of Google API? Such as Facebook or Twitter.
Here some examples of Facebook and Twitter with the same URL post.
Facebook:
https://graph.facebook.com/fql?q=SELECT%20total_count%20FROM%20link_stat%20WHERE%20url=%27http://www.beautydea.it/orly-baked-collezione-smalti-estate-2014/%27
Twitter:
http://urls.api.twitter.com/1/urls/count.json?url=http://www.beautydea.it/orly-baked-collezione-smalti-estate-2014/

Well if you are doing this on the server side, you could just load the url referred to by iframe of the button
https://apis.google.com/u/0/_/+1/fastbutton?usegapi=1&url=http%3A%2F%2Fwww.beautydea.it%2Forly-baked-collezione-smalti-estate-2014%2F
and read the count from the div with id "aggregateCount". You're out of luck on the client-side with that approach, since you can't load an external html page.

There is no supported API method for getting the +1 count of a URL. You can star the open feature request though.

Related

Vimeo search videos "app not allowed to perform that action"

Man it seems improbably difficult just to get a URL that searches Vimeo videos. They've got feed URLs to get specific users' videos, or info on a specific video, but seemingly not for a generic video search.
From other posts and the docs, I eventually came up with this:
https://api.vimeo.com/videos?query=vimeo&client_id=xxxxxxxxxxxxxx
...where client_id is valid (having registered my app).
However that yields an error that...
the app is not allowed to perform that action.
Any thoughts?
Edit - All API Apps now have access to the beta API by default. If you encounter this error it's a different issue, and you should contact Vimeo at https://vimeo.com/help/contact
It looks like you are trying to use API3.
Currently API3 is in beta, and has to be explicitly enabled by going to the url to edit your app : "developer.vimeo.com/apps/:id/edit" and add the querystring "?oauth2=enabled".
Your final URL should look like "developer.vimeo.com/apps/:id/edit?oauth2=enabled". Now save your app again with the new "OAuth 2" check box clicked and try your search request again.

Search for all G+ posts mentioning or linking to a domain or url?

Is there any way to search or structure a url in Google+ to get all posts that link to or reference a URL or domain? Similar to the way you can do it in Pinterest like http://pinterest.com/source/domain.com
This structured query does not get nearly everything: https://plus.google.com/u/0/s/domain.com
Google+ does not offer a specific API for getting posts that reference a specific URL or host. As Joanna mentions, you can use the activites.search method to do a full text search based on any given string, which could be a URL.
Google+ does not offer a URL that you can use to search to target specific shares. However, you can use the Google+ API to make an activities.search API call, where you can specify a query, which does a full text search. The API will return the public posts that contain the matched text.

Get all reviews and ratting from gplus

I have to get list of comment and rating of my goolge-plus page in json format form this url (test url)
https://plus.google.com/b/116355901745826833455/116355901745826833455/posts
I try in developer section of google-plus page. but i dont get appropriate method to find this. please any body can told me in which section of google developer i found this method. this is the first time i have to integrate any google api.
For your Google+ Page, you can make a call to activities.list using the Google+ Page ID to see all of the public posts that the Page has made, including +1s and comments and reshares on those posts. The documentation explains it well and also has an API explorer which you can try for yourself.
For additional information on a particular post, you can try comments.list--as you mentioned--or activities.get.
For the number of +1s for the Google+ Page specifically, you can try a people.get call using the Page ID.
The Google+ API does provide you with some information you ask for as Joanna states, but I believe what you really are looking for is the Place details within the Google Places API, which provides details about businesses, such as reviews. That API will return ratings and reviews. If you also needed +1s then you'd need to use both APIs.

How to make a custom LinkedIn share button

I need to be able to add sharing functionality to my custom button. I'm not interested with their generator, as I can't change LinkedIn image there. I want to use my own image for the LinkedIn share button.
Official LinkedIn API for sharing:
https://developer.linkedin.com/docs/share-on-linkedin
Read Terms of Use!
Example link using "Customized URL" method: http://www.linkedin.com/shareArticle?mini=true&url=https://stackoverflow.com/questions/10713542/how-to-make-custom-linkedin-share-button/10737122&title=How%20to%20make%20custom%20linkedin%20share%20button&summary=some%20summary%20if%20you%20want&source=stackoverflow.com
You just need to open it in popup using JavaScript or load it to iframe. Simple and works - that's what I was looking for!
EDIT: Video attached to a post:
I checked that you can't really embed any video to LinkedIn post, the only option is to add the link to the page with video itself.
You can achieve it by putting YT link into url param:
https://www.linkedin.com/shareArticle?mini=true&url=https://www.youtube.com/watch?v=SBi92AOSW2E
If you specify summary and title then LinkedIn will stop pulling it from the video, e.g.:
https://www.linkedin.com/shareArticle?mini=true&summary=youtube&title=f1&url=https://www.youtube.com/watch?v=SBi92AOSW2E
It does work exactly the same with Vimeo, and probably will work for any website. Hope it will help.
EDIT 2: Pulling images to the post:
When you open above links you will see that LinkedIn loads some images along with the passed URL (and optionally title and summary).
LinkedIn does it automatically, and you can read about it here: https://developer.linkedin.com/docs/share-on-linkedin#opengraph
It's interesting though as it says:
If Open Graph tags are present, LinkedIn's crawler will not have to
rely on it's own analysis to determine what content will be shared,
which improves the likelihood that the information that is shared is
exactly what you intended.
It tells me that even if Open Graph information is not attached, LinkedIn can pull this data based on its own analysis. And in case of YouTube it seems to be the case, as I couldn't find any Open Graph tags added to YouTube pages.
You can make your own sharing button using the LinkedIn ShareArticle URL, which can have the following parameters:
https://www.linkedin.com/shareArticle?mini=true&url={articleUrl}&title={articleTitle}&summary={articleSummary}&source={articleSource}
You can find the documentation here, just choose "Customized URL" to see the details.
Step 1 - Getting the URL Right
Many of the answers here were valid until recently. For now, the ONLY supported param is url, and the new share link is as follows...
https://www.linkedin.com/sharing/share-offsite/?url={url}
Make sure url is encoded, using something like fixedEncodeURIComponent().
Source: Official Microsoft.com Linkedin Share Plugin Documentation. All LinkedIn.com links for developer documentation appear to be blank pages now -- perhaps related to the acquisition of LinkedIn by Microsoft.
Step 2 - Setting Custom Parameters (Title, Image, Summary, etc.)
Once upon a time, you could use these params: title, summary, source. But if you look closely at all of the documentation, there is actually still a way to still set summary, title, etc.! Put these in the <head> block of the page you want to share...
<meta property='og:title' content='Title of the article"/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
<meta property='og:description' content='Description that will show in the preview"/>
<meta property='og:url' content='//www.example.com/URL of the article" />
Then LinkedIn will use these! Source: LinkedIn Developer Docs: Making Your Website Shareable on LinkedIn.
Step 3 - Verifying LinkedIn Share Results
Not sure you did everything right? Take the URL of the page you are sharing (i.e., example.com, not linkedin.com/share?url=example.com), and input that URL into the following: LinkedIn Post Inspector. This will tell you everything about how your URL is being shared!
This also pulls/invalidates the current cache of your page, and then refreshes it (in case you have a stuck, cached version of your page in LinkedIn's database). Because it pulls the cache, then refreshes it, sometimes it's best to use the LinkedIn Post Inspector twice, and use the second result as the expected output.
Still not sure? Here's an online demo I built with 20+ social share services. Inspect the source code and find out for yourself how exactly the LinkedIn sharing is working.
Step 4 - Finding More Social Sharing Services and Their Share URLs
I have been maintaining a Github Repo that's been tracking social-share URL formats since 2012, check it out: Github: Social Share URLs.
Why not join in on all the social share url's?
Its best to use customize url approach. And its the easiest. Found this one. It will open a popup window and you dont need any bs authentication issues because of w_share and all.
<a href="https://www.linkedin.com/shareArticle?mini=true&url=http://chillyfacts.com/create-linkedin-share-button-on-website-webpages&title=Create LinkedIn Share button on Website Webpages&summary=chillyfacts.com&source=Chillyfacts" onclick="window.open(this.href, 'mywin', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;">
<img src="http://chillyfacts.com/wp-content/uploads/2017/06/LinkedIN.gif" alt="" width="54" height="20" />
</a>
Just change the url with your own url. Here is the link http://chillyfacts.com/create-linkedin-share-button-on-website-webpages/
The API is updated now and the previous API will be deprecated on 1st March, 2019.
To create a custom Share button for LinkedIn, you need to make POST calls now. You can read the updated documentation here for doing so.
LinkedIn revised their site recently, so there are a ton of old links just redirecting to the developer support homepage. Here is an updated link to the relevant page on LinkedIn's support site (as of Feb 16, 2015): https://developer.linkedin.com/docs/share-on-linkedin
LinkedIn has updated their api and the sharing url's no longer works. Now you can only use the url query parameter. Any other parameter is going to be removed from the url by LinkedIn.
Now you're forced to use oAuth and interact with the linkedin API to share content on behalf of a user.
This works for me:
https://www.linkedin.com/shareArticle?mini=true&url=articleUrl&title=YourarticleTitle&summary=YourarticleSummary&source=YourarticleSource
You can use this link by replacing it with your content. It works 100%.
You can customize the standard Linkedin button like this, after the page load:
$(".IN-widget span:first-of-type").css({
'border': '2px solid #DCDCDC',
'-webkit-border-radius': '3px',
'-moz-border-radius': '3px',
'border-radius': '3px'
});

Is it possible to retrieve Facebook Pages information like notes, photos, and videos?

I've been up and down the Facebook API as well as all over the internets looking for an answer to this question.
Has anyone seen an example of a website that displays information pulled from a Facebook Page? Is this even possible?
I've been able to run the demos provided at Trying Out Facebook Connect and the API Test Console, but I've only been able to retrieve information on users not pages.
Any help would be appreciated.
Just tried it out on the console - it does work with pages. You just have to use the page ID instead of the user ID for whatever you're trying to get.
Example:
$facebook->api_client->photos_getAlbums(5281959998,'');
This gets the photo albums of the page with ID 5281959998, which is the NY Times.
For now, it doesn't appear possible. Quote from Stream.get:
This method returns an object (in JSON-encoded or XML format) that contains the stream from the perspective of a specific viewer -- currently, a user, and in the near future, a Facebook Page.