This article explains how to upload a photo to Facebook with the Graph API, directly from a Canvas element. No server is needed, as in my recent article about Facebook upload with FormData.
Social Media
Facebook, Youtube, Diaspora, Twitter, …
Facebook JavaScript SDK – Photo upload with FormData
Uploading a photo to Facebook is quite easy if the photo is on a server already. This tutorials explains how to upload a photo to Facebook directly from the device with FormData, without the need to upload in on a server first.
Facebook PHP SDK 5.0 Tutorial
As a guy who prefers to use modern stuff like Node.js instead of crappy old PHP, I´m not really a fan of the Facebook PHP SDK. But sometimes you just need to use it – so here´s a basic tutorial for the current Facebook PHP SDK, they bumped it up a major version so i had to try it. It´s a bit weird that they call it “v4-5.0” though. I knew it would be a problem to use the tag “facebook-php-sdk-v4” on github…
Facebook API – Login with the JavaScript SDK
I´ve seen a lot of weird coding happening around Login with the Facebook JavaScript SDK, so here is one good solution with explanation.
Facebook PHP SDK 4.0 Tutorial
Facebook changed their PHP SDK a lot with version 4.0, so i thought you could use a tiny tutorial how to authorize users and how to use the API with the new version. Feel free to comment about any errors or suggestions.
Extended Page Access Tokens with CURL
This is a follow up to my article about Access Tokens for Facebook. It is quite easy to generate an Extended Page Access Token with the PHP SDK, but being a big fan of the Facebook JavaScript SDK i try to avoid using the PHP SDK. So this is how you create an Extended Page Access Token with CURL only. Just in case you don´t know about those Tokens: They can be used to post to a Page (as the Page, not a User) or get the Page Insights – but the most important thing is that they don´t have an expiration date! You generate it once, store it in your database and use it forever.
Facebook API – Access Tokens
There are 3 different Access Tokens, each one with a specific purpose while dealing with the Facebook API. The Facebook docs cover the basics to get you started, it´s all about the Web here, so i will not cover the fourth one in the list: the “Client Token”.
Heroku – PostgreSQL Addon
I´ve already explained how to use “Heroku” in my Article “Heroku – Gratis SSL für Facebook Apps“, but Heroku offers a lot more with the Add-Ons. For example, “PostgreSQL” for – surprise, surprise – PostgreSQL databases. A wonderful alternative to MySQL, to store User data in a Facebook App (for example). Here´s a mini-tutorial:
Heroku – Free SSL for Facebook Apps
For Facebook Canvas Apps and Page/Tab Apps, you need a server with SSL. You can either buy a server with a certificate, or you can use the “Heroku Cloud Application Platform“. Up to 5MB space are for free, should be enough for smaller Apps. Just be warned, Heroku is pretty slow, it can take a few seconds until the Page responds.
Facebook API – User Events
This a follow-up of my recent article about reading the guest list of a Facebook Event created through Facebook Pages. If you want to get the Events (and the attendees) of a User, it´s a bit more work. You need to authorize the User with the permission “user_events”, and you will still just get the Events the user is attending too with the “/events” connection. I spare you the details of creating an app, this is just the authorization code for the PHP SDK:
$facebook->getLoginUrl(array('scope' => 'user_events'))