Search for a YouTube link in twitter feed? - php

I wonder if I can search for a tweets that shared a particular YouTube video. And sort out the users who got the most followers sharing the YouTube video. Only using their API and in PHP.

Given that Twitter (and other URL shortening applications) encode the URL, you'll have to do the following:
1) Collect all your tweets with hyperlinks
2) Open the hyperlinks to see if they redirect to Youtube
3) Compile the ID's on the redirects
4) Use the Twitter API to do identify your followers
In short yes, but no.

Related

Is it possible to get the number of facebook video views using facebook graph API

I have Looked at the facebook graph api reference for videos (https://developers.facebook.com/docs/graph-api/reference/video) But I currently don't see any way of getting the number of facebook video views. Is it possible to get the number of facebook video views using this api or any other walkaround?
You can use the insights edge to retrieve video views.

Play youtube video using youtube api v3 in php

I am using YouTube Data API(v3) for accessing data of youtube.
I search a lot how can I play a video in PHP using this API, but I couldn't find anything.
I know there is a way to play YouTube videos.
Embed a video
Using iFrame
However, YouTube is blocked in region I live, which means I can't use any method from them.
Are there any workarounds?
For instance, playit.pk can play videos even if region is blocked.
UPDATE
how can playit.pk access YouTube video URL like.
https://r2---sn-npo7en7d.c.doc-0-0-sj.sj.googleusercontent.com/videoplayback?upn=yS-T9e4J_3o&id=15589d4018f319ea&mime=video/mp4&mm=31&mn=sn-npo7en7d&ms=au&mt=1444897255&mv=m&ip=2400:6180:0:d0::27:f001&key=yt6&initcwndbps=13453750&ipbits=0&ratebypass=yes&sver=3&signature=A365AA3ADA506748AE53F0493B34E4B4AE807DCC.9F8EB21E86E4F5682BFFD44768102434DA58341B&fexp=9405958,9408710,9413271,9414764,9416126,9416359,9417707,9418204,9418400,9418809,9418997,9419837,9420351,9421923,9422553&nh=IgpwcjAxLnNpbjAzKgkxMjcuMC4wLjE&expire=1444918985&sparams=dur,id,initcwndbps,ip,ipbits,itag,lmt,mime,mm,mn,ms,mv,nh,pl,ratebypass,requiressl,source,upn,expire&source=youtube&dur=408.090&itag=18&pl=48&requiressl=yes&lmt=1434858572379608
If I found this kind of url I can play video very easily.
Can i access that kind of URL using api v3 if not then how can they do that.

Get last 3 instagram images posted in a place

I've been over the Instagram API for a long time, and couldn't find a way to get the last 3 instagram images posted in a specific place.
For example, a visitor search for "Patrick's Pub". The website will redirect him to the pub's page in my website, and there I will be able to display the last 3 instagram images posted in Patrick's Pub.
Is there any way to display these images? I thought about this URL:
https://api.instagram.com/v1/locations/search?lat=*LAT*&lng=*LNG*&access_token=*THETOKEN*
But there are 2 problems with this:
1. I can't find a way to convert LAT and LNG coordinates to a place (like the Patrick's bar)
2. If need an access token for this URL, it means the user need to log in to his instagram account, and it will not be suitable for the website, for just vieweing a place instagram photos.
Any help will be appreciated.
Its a 3-step approach:
Instagram uses Facebook Places to tag a photo to places, you have to use facebook graph API to search for actual places at a location and get the facebook_places_id:
https://graph.facebook.com/search?q={NAME}&type=place&center={LAT,LNG}&access_token={ACCESS_TOKEN}&expires_in=5184000
You then have to make a Instagram location search API call with the facebook_places_id to get the instagram_location_id:
https://api.instagram.com/v1/locations/search?facebook_places_id={FACEBOOK_PLACES_ID}&access_token={ACCESS-TOKEN}
https://instagram.com/developer/endpoints/locations/#get_locations_search
Use the instagram location id to get the recent photos from the place, using the Instagram location media API:
https://api.instagram.com/v1/locations/{location-id}/media/recent?access_token={ACCESS-TOKEN}
https://instagram.com/developer/endpoints/locations/#get_locations_media_recent
Here is an implementation of this search: http://www.gramfeed.com/instagram/places

Get URL values from <iframe> with different domain name

I used a form to capture data from clients. In this form is an iframe that loads youtube videos onto youtube. The reason for the different URL is because my original code was written in CakePHP and the youtube api uses the Zend Framework.
Now I need the values returned from youtube that is stored in the URL of the iframe to save in the DB, so that when called later the video will open with the correct listing.
Any advise?
There is no way to get any information about pages loaded into an iframe if the document loaded into it comes from a different domain. This is due to the same origin policy.
YouTube has an API that allows people to perform searches of YouTube from your website. You could use that to allow people to select videos instead of trying to reverse engineer the YouTube URI system.

Is it possible to Implement youtube channels uploaded videos list into website?

What I want to do is, to show uploaded videos list of my youtube channel to website's visitors.
Something like that. (Image take from youtube channel, I want to show exactly this way)
Don't want to create iframe. Can I fetch data from channels exact page with PHP or something else? I have no idea if it's possible with youtube api. Any suggestions?
Yes you can. The videos on a channel are essentially a user's so using the YouTube GData API you can make a call to http://gdata.youtube.com/feeds/api/videos?author=ahmednuaman (my videos for example).

Categories