How to pass the custom title, description and Image to google plus button like facebook share button - google-plus

I one of my project I am using the sharing buttons for multiple article. I need the link share urls for facebook, twitter and google plus.
To Facebook I can pass every parameter (title,image, description) to share URL. using following code
http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&&p[images][0]=<?php echo $image;?>'
But For google plus I can pass only two parameters. (url and lang code). You can check the documentation here.
google share link api
Google itself crawl the webpage and take the title, description and image from webpage.
Problem:
I am loading content through javascript so when crawler came page web page. It is not able to collect the information.

You can find answer for you question by visiting below url:
Google+ share with custom text and thumbnail

Here is the url you could do after 3 years
https://plus.google.com/share?url=http%3A//google.com

Related

generating streaming link api

i want to know how to use google api, can anyone give some example using php.
eg. use api to get picasa album rss.
Any help is appreciated!
For that you have to embed the video in your html with an iframe and a url like this:
<iframe src="https://drive.google.com/file/d/{videoID}/preview" width="640" height="480"></iframe>
Just change the {videoID} for the id of you video.
To get that code from Google, you should follow the next steps:
Open the video in your Drive.
In the top right of the view, you will see an icon that says "Pop-out", Click on it.
It will open the video in a new tab.
In the new tab click on the icon of the three dots that says "More actions" (in the top-center).
Select the option that says "Embed item...". You will see a popup with html code.
In general, there is no way to "predict" or "construct" a direct link to your Drive file. The supported method of getting the link is to use the Drive API. If you make an HTTP request to the file metadata endpoint https://www.googleapis.com/drive/v2/files/{fileId} with a valid API key, the webContentLink value should be the googleusercontent.com URL for your file.
You can try this out on the Google API Explorer - drive.files.get to see all of the information which is available through the Drive API.

Display Google plus community post on web page

I am using this method for embedding post on my webpage.
The easiest method is to locate the post that you want to embed on plus.google.com and click the downward pointing arrow that indicates the menu menu icon and choose Embed post. dialog displays with code that you can copy and paste into the desired location within your article or site. For example:
But i want to display a community post on my web page. Can anyone please explain the procedure to me?
Google+ Embedded Posts
The following post types are not supported:
Posts from within a community, including publicly reshared posts from a community.

Google+ badge on websites

I am trying to put a Google+ badge on my recently created websites at sites.google.com. When I copy the code and paste it into the HTML box actually nothing happens.
What am I doing wrong?
You can use to insert a Google+ Badge into your Google Sites pages using a custom gadget:
Get your Google+ profile ID, which you can get from the URL of your profile. The ID would be 123456789012345678901 for this URL: https://plus.google.com/123456789012345678901/ or would be +LarryPage for this URL: https://plus.google.com/+LarryPage/
Edit the page that you want to add the badge
Choose Insert-> ...More gadgets...
Search for G+ Badge.
Paste your profile ID into the G+ ID field.
Configure additional options as necessary for your page. You might need to adjust dimensions of the gadget container to get the badge to work well in your site.
Gadgets have limitations, this might not work perfectly but its probably the best way to get a badge onto your page.
There is a configuration tool for the Google+ Badge that you can find at https://developers.google.com/+/web/badge/.
The key points are that you need to add the HTML as a widget and include the JavaScript tag--which is the same JavaScript that loads any of our Google+ attributes.
I also made a 3 minute video explaining these steps last year, which you can view at http://www.youtube.com/watch?v=wLG4IIIPgnc.

Google share button, is it possible to share content from one URL and link back to another?

Example an online learning application that you want to share your results which are behind a logged in part of your site. So you add a public URL to your site for google to fetch the content (img, description, title):
data-href="http://www.example.com?result_id=24".
But then when someone views the post and sees the shared content and clicks the link to the site it goes to:
http://www.example.com?result_id=24
The only way I can think of is redirecting the user to http://www.example.com once they land on the shared URL.
Is there an official way or better way to do this?
Thanks
No, but there is a work around.
The URL that you share is used for both the snippet and place users are sent when they click.
However, you can put schema.org or OpenGraph markup on these pages that describes the content behind the login wall. This will allow you to specify a title, description and thumbnail. You can read more about configuring your snippet on Google Developers.

Changing the behavior of YouTube API generated links

My goal is to display YouTube search results in my website based on a keywords search (e.g through YouTube API or GoogleCustomSearch using youtube.com), but change it so when you click on the link - instead of redirecting you to the youtube video page, it will get the link's URL and transfer it to a PHP file as a variable.
You can read the result page with a CURL command, and use regular expressions to change the link urls to a link to your own link, wrapping the target url.
Something like this :
http://www.youtube.com/watch?v=XJ87Lsx40PI
turn it into :
http://yoursite.com/youtube.php?XJ87Lsx40PI