What is the FBML tag or any other option (I mean in API) to take photo from a webcam in Facebook (and next upload it to my profile)? I can see such an option in my profile, but I don't know how to use it in Facebook app.
There is no such option (as far as I know). In any case FBML will be deprecated on June 6, 2012. You will have to look into the video API https://developers.facebook.com/docs/reference/api/user/#videos.
There are examples on the Facebook Developers' blog of how to achieve this
Using the Graph API to upload Video
Uploading Videos to an Application, Group, or Page via the Graph API
Related
I am developing a Facebook application, and I am trying to publish the users' activites in my application in the user's wall, like when the user comments on post, the story feedback appears in his wall and is available to his friends to see
I have read these tutorials:
https://developers.facebook.com/docs/opengraph/tutorial/
As well as the following threads:
How to publish Actions to Facebook Graph API with parameters in call URL
Facebook- Publishing a story to user's wall
I am confused about which one I should follow because openGraph seems a bit complicated to implement....so what is the best practice to achieve my requirement?
If you want to post activities on users wall, open graph is preferred way and you will get large distribution(marketing) also.
You can use the PHP Official sdk from facebook, which makes you job easier.
To post open graph actions, you should take publish_actions extended permission from user.
or
You can post on user's wall using /me/feed method requires [publish_stream][3] extended permission.
SDK tutorial
https://developers.facebook.com/docs/reference/php/
Open graph sample application
Download Social Cafe app and see their code
https://developers.facebook.com/docs/opengraph/samples/
You can use Javascript SDK as well, and sometimes that is actually getting better. For example, recently Facebook enforces that users have to read for at least 10 seconds before the app publishes news:Read. These are the usecases that can be handled very efficiently with javascript sdk and jquery (or similar client-side technology).
As for April 2018,
The publish_actions permission is no longer available.
I'm doing preliminary research for an upcoming project. Basically here is the user/data flow:
A webcam at an event takes pictures and sends the photos to a local server
A brand rep has an iPad with an app (developed as an HTML app saved to iPad home screen as an app). The app displays all photos from the local server as thumbnails via simple AJAX calls to load them into the view.
A user selects a photo. That photo will be sent from our local server to our remote server. The remote server will host a Facebook iFrame tab with the user selected photos.
At the same time, a link to the iFrame tab with a query string will be posted on the user's Facebook wall and Twitter (if they choose to authenticate of course).
Now the tricky part, we are 99% sure that the client is going to want to also upload the photo directly to the Facebook user's album. Possibly to TwitPic as well but that is a secondary concern. So my question is, is there a way to use PHP to upload a photo to a Facebook wall without using a typical html file input field and POST? Ideally, if we can do some kind of a file_get_contents on the photo URL from the local server and use PHP/FB API to upload the contents of the photo URL, we'd be in great shape.
The goal is to have the photo uploaded to the user wall with a caption like:
Check out my photo taken at _ event! [URL to client facebook tab with photo id].
#jeremyharris is right to say that Facebook's PHP SDK wraps cURL. You indeed need to use cURL to post a request to Facebook's API endpoint. Though, start by reading http://developers.facebook.com/docs/reference/api/ Publishing section to understand the mechanics before you jump onto their SDK.
Then familiarise with the feed object. You can use either it or the photo object to upload the photo.
Can you please have a look to this URL
http://developers.facebook.com/docs/reference/rest/photos.upload/
I need to have a working example, how can I use this api to upload a photo to my facebook profile.
Actually I have a php site from where I want to allow users to upload photo to their facebook profile.
Thank you
The link you posted refers to an outdated approach to FB API. It's better to use the Graph API in conjunction with the latest PHP SDK.
http://developers.facebook.com/docs/reference/api/
https://github.com/facebook/php-sdk
here's a reference to the photo object methods
http://developers.facebook.com/docs/reference/api/photo/
Here's a fairly recent example from the facebook developers blog:
http://developers.facebook.com/blog/post/498/
We are developing a facebook iframe application that pulls some images (via an API) to the current user album (creates a new one).
The user views his newly uploaded album photos using a facebook lightbox clone. In this clone he must be able to comment and like the current viewed photo.
Is there a way to provide facebook comments & like to these pictures without the use of the Graph API (which would require us to replicate a lot of visuals).
Another try was the social plug-ins with the facebook photo url given but no success.
Any ideas?
I would recommend using the social plugins that facebook provide.
For the likes and comments you can specify a URL in the plugin code, that URL should be the URL of the photo relative to your app e.g. http://myapp.com/photo/123 and not the http://app.facebook.com address.
Facebook will need to be able to crawl that URL so if you are checking if the user is logged in via PHP then you should either disable this if the user agent contains facebookexternalhit or show a different page for that user agent. It doesn't matter about the content, just set a couple of og: meta tags and that should be fine.
I have developed an application for facebook. I want to post a video on the users wall using the graph API. What can I do to publish video on facebook wall?
Recently i have to do the same thing and to do it is very simple.
The parameters you must use are:
source = urlencode ( url/to/swf )
link = url/to/web
picture = url/to/picture
And no more, so if you use the graph api you the url will be like:
https://graph.facebook.com/userID/feed?access_token=&source=urlencode
(url/to/swf)&picture=url/to/picture&link=url/to/web
Hope it will help.
As of April 2011, Facebook has added the ability to upload videos through the new graph API:
http://developers.facebook.com/blog/post/493/