Tag Archives: nokia_dev

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

4 Comments

Filed under Uncategorized