Ok, so here was my first question: How do I allow visitors on my site to share my photos on their facebook news feed?
After implementing it I realized what I really want is to upload the image as a photo to their photo album.
How would I got about getting an image on my site, to upload to their photo album, when they click on a facebook icon next to the image?
Any thoughts at all are appreciated.
Thank You.
Click on 'Photos' - there you'll find three tabs - Photos of You, Albums, and Synced. Tapping 'Synced' will take you to a window where you can turn automatic uploading on. All your photos will begin to be automatically uploaded, but Facebook does limit you to just 2GB worth of photos.
Once you upload and store photos and videos in Google Photos, you can share from Google Photos to Facebook friends easily. Because Google Photos is fully and completely integrated with various social media platforms.
Register your application at Facebook (create a Facebook app).
Authenticate the user with Facebook, at the same time user approves your app access.
Use Facebook publishing api to upload image (follow link, look for Publishing title).
First make sure that you are authorized to publish to the user's feed with the publish_stream permission.
Then use the api commands to send the photo to the server.
Here's an example using the Branches FB API:
Dim FB As New SessionInfo("[access_token]")
Dim Posts = New Functions.Posts(FB)
Dim img As String = "[Local picture Location]"
Dim F = New IO.FileStream(img, IO.FileMode.Open, IO.FileAccess.Read)
Dim B(F.Length - 1) As Byte
F.Read(B, 0, B.Length)
F.Close()
Dim PhotoID = Posts.PublishPhoto("[Album ID]", "[caption]", true, B, [Optional Tags if any])
Tagging users is similar, just pass in a tag list when you call PublishPhoto
Dim TL As New List(Of Tag)
Dim T As New Tag
T.id = "[userID]"
TL.Add(T)
Dim PhotoID = Posts.PublishPhoto("["me" or Album ID]", "[caption]", true, B, TL)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With