Upload CameraCaptureTask Photo/Image to Facebook

This following article shows you how to upload the image from CameraCaptureTask to Facebook in less than 10 steps. The following Assembly/DLL will take care of all the Facebook Security (OAuth) code for you. With this DLL, you will not need to learn about Facebook Graph API.

To start with this, you need to download the following

1. Add reference to this 2 files and Microsoft.Phone.Controls.Toolkit

image

2. Get your Facebook App ID/API Key from http://developers.facebook.com/apps. You will need the information in order to allow users to upload image to Facebook.

3. Open the WMAppManifest.xml and make sure the application allows Camera and WebBrowser capabilites

image

4. In order to call the API, you need to enter the following code into your application.

VB.Net

Dim facebook As GainSecure.WindowsPhone.Facebook
facebook = New GainSecure.WindowsPhone.Facebook(Me.NavigationService)

With facebook
‘Your AppID/API key come here’
.AppID = “1234567890”   

    ‘In order to allow uploading photo to Facebook, the following scope is compulsory’
.Scope = “publish_stream,user_photos”
End With

facebook.Message = “Hello World”
facebook.CameraCapture()

4. The DLL will popup all the following screens as well as Login screen if user is not authenticated.

1234

5. After that the photo will be uploaded to Facebook

image

About these ads

4 Comments

Filed under Uncategorized

4 responses to “Upload CameraCaptureTask Photo/Image to Facebook

  1. Jack

    Just what I was looking for! Thanks :D

  2. hi Jack,

    I hope the assembly is useful and easy to use.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s