editing a live video using php - php

I want to build an facebook application using which i will show a advertisement video shot by advertisement company on the facebook page and in that video at specific place i want to show the logged user's profile pic.
Explaining more...it will be an live video (not the one created by graphics) where one or two place i will show the logged user profile picture for example if two people are talking and one is having a phone then at that phone i will show logged user profile pic.
can any body please give me any idea how i can achieve this ?
i know following things.
making a facebook application
embedding a video in it.
fetching the logged in user information like profile pic and all.
I need help with following.
How to edit a video and show the fetched profile picture in the particular place of that video. ??
thanks,

php cant edit videos. Maybe you can try to run an commandline programm from php like avisynth or ffmpeg to genreate the video withou php.

Related

How to extract the profile picture of some user from facebook or instagram and upload it to profile page of that user at our website??

I am building a website using backend language as PHP.I am using MySql as database.So in my site we have usual registration system where any user can register him/her self.And then we ask to him to complete his/her profile on his/her profile page.
Okk so on profile page there are so many details about the user(like Date of birth,About his/her self, About his/her education, About his/her gender,Ethnicity,...etc) that we ask to fill.
One important attribute of the user profile is his/her profile picture.So user can upload his/her profile picture on his/her profile page.
But we want to give user 3 options :
1.He/she can upload picture from own computer/phone
2.He/she can upload picture from own facebook profile
3.He/she can upload picture from own instagram profile
I have implemented the 1st option sucessfully and it is working correctly.But i have no idea about how to implement other 2 choices?
I have googled quite about this but i could not able to understand how this can be done i a easy approaching way?
I am not so proficient in PHP , so please help someone.
Thanks in advance.
So this is a multi part question with a number of factors, unfortunately I won't be able to give you a sample code you can copy and paste but I can hopefully point you in the direction where based on your configuration you know how to proceed.
The first thing you need to ask yourself is if you want to connect over OAuth so all the user has to do is login to facebook and you can get the content of information you'd like or get the FacebookID from the user (or an automated process if they provide the profile URL) and link directly to the image. You can using the Graph API to get to a users picture using the FacebookID like you can see below.
http://graph.facebook.com/" + facebookId + "/picture?type=square
For instance:
http://graph.facebook.com/67563683055/picture?type=square
There are also more sizes besides "square". See the docs.
You need to use OAuth you get the FacebookID of the person unless they provide you the id or url to their page.
As per my understanding you can use the graph API
Graph API
Replace userid_here with id of the user you want to get the photo of.
You can use the PHP's file_get_contents function to read that URL and process the retrieved data

Using graph api to bulk upload to facebook company page (not a user page)

I found this, but it is kinda confusing, and doesn't answer the question for me. I'm looking to upload images from my website to a Facebook page (my code works for users pages, not company pages), if there is a way to do it without having to make an application, I'd like that, but from what I've seen, that's not possible.
My code is here: http://pastebin.com/wBp1AQwG
Your link doesn't appear to go anywhere useful, I'm afraid.
Nonetheless, I'm guessing your problem here is that you need to use a Page access token not a user access token to publish to a page rather than a user feed.
See the section on Page Access Tokens at https://developers.facebook.com/docs/reference/api/page/
I've figured it out, here is a basic outline of the process for posting an image to an album that you own on a fanpage.
Get user authenticated
Get users accounts
Get albums, or create them
Post to the id of the album (ALBUM_ID/photos) with the image
It's pretty simple once I figured out the basics of the api.

PHP - Possible to automatically change MY profile pciture? Cover Photo?

Curious if the PHP Facebook SDK allows me to change only my own profile picture and cover photo. From the reading I've done I'm thinking no, but I wasn't able to find any recent, direct articles.
Any help is appreciated.
Looks like you can't actually change it, but you can get half way!
Setting Facebook Cover Photo via API
"ThereĀ“s no API support for changing user profile cover, but you can upload a photo and then redirect user to: http://www.facebook.com/profile.php?preview_cover=PHOTO_ID"

Is it possible to set an Image as a User Profile Picture via FBML or FB PHP SDK?

I am reading the Facebook API and I am google'ing for a method or function to be able to set an image as profile picture.
I need to know if something like this is possible at all.
In the old REST Api you find a note, that it isn't possible to upload a picture into the users profile pic album. But.. is this step required for my transaction?
I would like to know which methods/function I have to take and/or an advice how to code.
(trivial workflow of app: user visits fb-app, user clicks on button, user gets an request-alert to allow action, user gets manipulated picture as own profile picture)
thanks in advance
chris
Sorry, but not is possible. If you take a look here:
http://developers.facebook.com/docs/api
At the "Publishing" section the /PROFILE_ID/picture is not writable even if you can upload a photo to an album.

Facebook: How to add a Tag to a Fan page in the Caption of the Photo uploaded to users profile

I have seen a Fan page wall being tagged in a photos caption.
http://www.facebook.com/photo.php?fbid=165019486869988
Notice its in the Caption itself, and its a Fan page that was tagged, not a person.
How was this done? I actually cant even see how to do it manually on Facebook.
Can it be done in a Facebook PHP App? If so how?
So when my application posts to the users "Application Photo Album" the caption would have a link back to my apps fan page or app page.
This would all involve databases, and I have done something like this before. It is pretty involved the way facebook does it because they also link back to the tagged users page.
You would have to have a unique user ID for each user and a unique photo ID for each photo.
When a person pulls up the image the web site would query the MySQL Database and look for the record that matches the Photo ID, then it would look for the tagged User ID's that are attached to that Photo ID, which would be stored under that database record when the user was tagged.
The web site would then echo out the results of the database query to retrieve all of the tagged User ID's and you would have to then make the User ID's appear as the users name, which would require a function to take that User ID and query another database that will retrieve the users actual name and return it to the script.
The question you asked is very general and I can go on all day about the technicalities behind it, but I hope this gave you a general idea of how it can be done with PHP/MySQL.
Please let me know if you have any questions!!
I figured out that you can tag a fan page if you actually upload the image via your wall "Post Picture" then in the status message as your posting it you can tag the fan page #FanPage just like when you tag a friend in your status message.
Still not able to do this via programming.
Well i found a simpler solution to the same that uses the graph api
http://developers.facebook.com/docs/reference/api/photo/
You can specify which user to tag using two methods: in the URL path as PHOTO_ID/tags/USER_ID, or in a URL parameter as PHOTO_ID/tags?to=USER_ID. To add several tags at once, you can specify a tags property which contains an array of tags like so PHOTO_ID/tags?tags=[{"id":"1234"}, {"id":"12345"}]. Currently, you cannot tag a Page in a photo using this API.
Tagging a photo requires the user_photos and publish_stream permissions, publish_stream is optional - if not present, the tag will go through Tag Review of the tagged person if s/he has this privacy setting enabled. Tagging a photo supports the following parameters.
Hope this resolves the issue

Categories