Facebook Graph API get video info from user upload - php

Though it is possible to get video information uploaded by a page, how do you get video info uploaded by a user which is publicly available?
This can be done when it is uploaded by a Page.
https://graph.facebook.com/VIDEO_ID/picture
https://graph.facebook.com/VIDEO_ID
But not when uploaded by a user.
I know this is possible because there are free online facebook downloaders that could grab the video of a user. Of course it should be publicly available.
Source: How to get Facebook video thumbnail from its video id?

Related

How to get the Instagram Media ID of particular Post in iOS?

When user try to share the video on Instagram it will open the Insta Library and the it will get share, I done that but I need the media ID of that shared video. Or it will be do it any another way like PHP or nay?

Who will be the owner of video uploaded through youtube direct?

I am working on a project where user can upload videos on my YouTube channel. I am using YouTube Direct Lite to create upload widget.
I wanted to know who will be the owner of those videos on YouTube?
According to YouTube DirectLite documentation :
The submission widget allows anyone visting your site to upload a new video to their own YouTube account from their hard drive, record a new video using their computer's webcam, or to submit a video that they've already uploaded for review.

Facebook Cover Photo API using PHP

Has Facebook released any api for facebook cover photo?
I want to implement it using PHP language.
EDIT
I want to upload cover photo in facebook timeline using graph api PHP
There is an api for updating the cover photo on a page
http://developers.facebook.com/docs/reference/api/page/
It asks for a photo id which i guess is the id of a photo from the users album.
Actually, it is not possible to change the profile picture directly via Facebook Photo Graph API as no section mention about that.
However, we can do a trick by uploading user’s photo to Facebook via the API then redirect the user to uploaded photo URL with 1 added in querystring parameter as below:
http://www.facebook.com/photo.php?pid=xyz&id=abc&makeprofile=1
“&makeprofile=1″ is the main thing here and xyz/abc will be returned by Facebook. By adding the parameter, Facebook will auto change the profile picture of the current user with the uploaded picture above.
For more info:
http://4rapiddev.com/facebook-graph-api/php-change-facebook-profile-picture-with-graph-api/
You can upload photo to an album via graph api. Get the new photo id and redirect user to this url
"http://www.facebook.com/profile.php?preview_cover=" + photo_id
before that, you should inform the user that he/she will be redirected to facebook to page where they can set new cover photo (they need to confirm the change, click the save button). It's not perfect solution, and not fully covered api but it's best way out there asfaik.

How to get album id and to upload image to fan page album

All available descriptions to upload an image to a fanpage use an album id, but
no one describes the format of the id and how to get it.
Are there examples of php code to get the album id of an album on a fanpage
and examples to upload an image to that page
Here are the steps you will need to build, using the graph api.
Get the facebook ID for the page.
Get an access_token from the page you want to upload to.
Make a form to POST to "https://graph.facebook.com/". $_userID . "/photos?access_token=". $_accessToken
The image will be uploaded to a folder with the same name as you app. So if your app is called "Magic Photo Uploader", the photos will go into a folder called "Magic Photo Uploader Photos"
In my experience you will not need an album ID, I think that documentation is outdated, since for all my apps it makes a album for those app photos and I cannot rename it. But there was once upon a facebook, a REST API that used to let you create and populate albums. Not sure if that is still accessible as a legacy.

Facebook API/PHP - Is it possible to change a user's profile image via FB Graph API?

Is it possible to set/change a user's facebook profile image through the graph API?
I can't find a specific API method, but it is possible to upload an image to a user's album (http://developers.facebook.com/docs/reference/api/photo). Can I set the user's profile image to an image uploaded to their album?
Edit:
Same question asked in reference to REST API
Can I set a users profile image using the Facebook API?
No, And here's a comment from a guy at facebook:
The Original Link - you have to press show comments
We can do a trick by uploading user’s photo to Facebook via the API then redirect the user to uploaded photo URL with makeprofile=1 added to the list of query strings:
facebook.com/photo.php?pid=xyz&id=abc&makeprofile=1
Check Auto Change Facebook Profile Picture to get PHP example and demo.
Currently this is possible by redirecting the user to the mobile profile pic change url, https://m.facebook.com/photo.php?fbid=[fb photo id]&prof&ls=your_photo_permalink
The previous work around, using the facebook.com/photo.php?pid=[fb photo id]&makeprofile=1 url no longer works.
To the best of my knowledge and experience: No.
See the "Publishing" section here: http://developers.facebook.com/docs/reference/api/photo
Requires the publish_stream
permission.
To publish a photo, issue a POST
request with the photo file attachment
as multipart/form-data.
You can publish an individual photo to
a user profile with a POST to
http://graph.facebook.com/PROFILE_ID/photos
We automatically create an album for
your application if it does not
already exist. All photos from your
application will be published to the
same automatically created album.
You can publish a photo to a specific,
existing photo album with a POST to
http://graph.facebook.com/ALBUM_ID/photos.
The last sentence states you can publish to an existing album, so if you're trying to update the user's profile picture (not sure from the way you stated your question), try getting the album ID for the user, then publishing to that.

Categories