Changing the behavior of YouTube API generated links - api

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

Related

Vuejs SPA Change meta tag content from third party api

I've tried to change meta tag content like
document.title = response.data.seo_page_title[0].text;
document.head.querySelector('meta[name=description]').content = response.data.seo_description;
it change the content when inspect the page but not when i use view soure. So Google, FB and Twitter can't recognize the updated content and doesn't load the proper text when i try to share the page on social media.
View Source shows the original source that has been fetched from the network - it is not the current snapshot of the page. As you have noticed - the current snapshot of the page is available in the DevTools. If you need Google / FB / etc. to see the proper text - you will have to produce this text on the server side (when composing the HTML template) instead of in the browser.

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.

Hide url parameters on google search result

Hello there i have a question about google search result.
I searched website on google and the result is just like following image:
I don't want to show parameter on google result. Is there a way to hide it?
Yes you can hide parameters in Google.
Follow
Google Webmaster --> Crawl --> URL Parameters
after that click Configure URL parameters ยป
than click add parameters
add parameters which you want not to index in Google.
Regards

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

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

How to index Dynamic url page

I have a site that look like this:
Main page (index.php)
where a user can research a business.
To display result at page (search/index.php), the page url will look something like this:
/search/index.php?what=plumber&where=montreal&page=1
The page will generate dynamic link to access the business profile found. When you click on one of those links, you get here:
/entreprises/index.php?companyName=Something
How can I get the previous link to be indexed on Google?
This appears to be a good situation for the canonical URL tag. You'll want to specify a single URL for the page in question, and then other variations of that url getting to the same page (i.e. searches, tags, etc.) will refer to the stated canonical url as the actual url for SEO purposes.
Google has a detailed description of the tag here:
https://support.google.com/webmasters/answer/139394?hl=en