Facebook Graph API Sync Photo Album - facebook

I'm trying to sync a photo album to a facebook group album. When using a token as a user with moderator permissions I can view and post photos to the album using
GET https://graph.facebook.com/v3.2/{album_id}/photos
and
POST https://graph.facebook.com/v3.2/{album_id}/photos
However, when I go to delete photos I get:
"(#200) The permission(s) publish_actions are not available. It has been deprecated. If you want to provide a way for your app users to share content to Facebook, we encourage you to use our Sharing products instead."
With the recent changes to the api and removal of publish_actions is there anyway to delete photos in group albums? Or is there a better approach?

Related

How to get OTHER users' photos and albums with Facebook Graph API

Scenario: logged with my Facebook account and using a browser, I'm able to see some photos and albums of some users which aren't friends of mine (with a privacy setting of public or similar) and quite all their past profile photos.
For example the URL
https://www.facebook.com/<userid>/photos_all shows those photos.
I want to replicate behaviour with Graph API but GETting
https://graph.facebook.com/<userid>/photos?access_token=...
Gives me an empty data array.
Same scenario using tagged or albums instead of photos
I've tried to use site scraping but FB website uses AJAX to populate gridview of photos, so It's very difficult.
On Graph API Explorer I've requested and use an access token with all permissions and also a debug access token but I'm still unable to get other users' photos.
It's possibile to get photos of users which aren't in friend list with Facebook Graph API? Am I missing something?
For privacy reasons, it´s not possible to get the photos of OTHER users with the API. Even for the authorized user, you need the user_photos permission.
Scraping is not allowed btw: https://www.facebook.com/apps/site_scraping_tos_terms.php

Facebook Scopes for ALL photos in Graph API v2.0

This is more of a generic question: which combination of scope permissions and endpoints in V2.0 of the Graph API allows an app to access every photo that I either uploaded or that I was tagged in?
In other apps I've seen "this app will receive the following info: your public profile, friend list, email address, photos and videos and your friends' photos and videos."
I only know of user_photos and user_videos, which when I use only returns 60% of the photos that I see when I'm logged into my personal Facebook account.
In browsing these lists in graph explorer, it's not clear which permissions are responsible for "your friends' photos and videos.
Found this bug report on Facebook - https://developers.facebook.com/bugs/701749743226238/

How can I find the application that posted a Facebook photo via Graph API?

I have an application that pulls in content from both Facebook and Instagram, but users frequently cross-post the same photo. Using the Facebook Graph API, I'm trying to find a way to determine if any given photo was posted via Instagram.
I'm confident that this data exists, but I don't know how to access it via the API. Looking at one of my own cross-posted photos, I know Facebook at least has the data:
Have a look at the similar questions
How to get Likes of Instagram photo posts in Facebook Graph API?
Posts from Instagram not showing up on Facebook Open Graph API
And the bug report at FB: https://developers.facebook.com/bugs/110563582419837/
You could query the "Instagram Photos" album with FQL:
select pid, images from photo where album_object_id in (select object_id from album where owner = me() and name='Instagram Photos')
There were two solutions.
We only were asking for user_photo and user_status permissions. If we had asked for read_stream, we could have looked at the /me/posts endpoint, which offers the application field. We might do this, but the permissions could be confusing for users since it also allows us to read their newsfeed. Ideally, there'd be a user_posts permission that just gave us access to everything the user posts, but nothing posted by their friends.
Every Instagram photo shared is put into the same Facebook album. So, we just check to see if a photo is put in that album and disregard it if they've also authenticated with Instagram in our application. It feels less reliable, but it works.

How to fetch a user Facebook photo albums that I am not friends with

I want to create a FB app that fetches all of Andy's photo albums. Andy's photo albums are all set to be publicly viewable. Andy has 0 facebook friends.
With respect to FB permissions... How can I get all of Andy's photo albums to be fetched and displayed onto a public website? Visitors arriving to the website will NOT be friends with Andy ...and... will NOT do a facebook authentication upon arriving to the site.
Is this feasible? Is it possible to get ALL public photo albums from Andy without requiring permissions or being friends of Andy?
Is one possible solution to... have Andy to provide photo permissions and then do a cron job and store the FB response into a database for the website to fetch from?
Please let me know! Thanks
No, you can't fetch the albums/photos of a non-friend (even if some pictures of that user are public). This is not supported via the API.
You can just get the-
photos of the user : /me/photos with permission: user_photos
photos of the friends: /FRIEND_ID/photos with permission: friends_photos
current profile picture of any user xyz: /USER_ID/picture
The albums belonging to a Page, if they're public-visible /PAGE_ID/photos
(it seems that you want to create a dummy user, and fetch all the photos from thers, if so, point 4 could be useful to you)

How to count photos on my FANPAGE wall?

I gave an access to fans to upload photos to FANPAGEs wall. How can I count posted photots?
I am too young in FB.apis :-(
Thanks!
I've just read http://developers.facebook.com/docs/reference/api/photo/
An individual photo as represented in the Graph API.
To read the 'photo' object you need
any valid access_token if it is public
user_photos permission to access photos and albums uploaded by the user, and photos in which the user has been tagged
friends_photos permission to access friends' photos and photos in which the user's friends have been tagged
To publish a 'photo' object you need
a valid access token
publish_stream permission
With that granted, you can upload a photo by issuing an HTTP POST request with the photo content and an optional description to one these to Graph API connections:
https://graph.facebook.com/USER_ID/photos - The photo will be published to an album created for your app. We automatically create an album for your app if it does not already exist. All photos uploaded this way will then be added to this same album.
https://graph.facebook.com/ALBUM_ID/photos - The photo will be published to a specific, existing photo album, represented by the ALBUM_ID. Regular albums have a size limit of 200 photos. Default application albums have a size limit of 1000 photos.
PAGE or APP creates OWN XLBUM which can access the same way: https://graph.facebook.com/ALBUM_ID/photos
But there is 1000 photos limitation!
Via the Graph API you can get the Photos connection off of the Page object.
See: http://developers.facebook.com/docs/reference/api/page/
You can play around here: http://developers.facebook.com/tools/explorer
Get /me/accounts
Click one of the page IDs that show up that has some photos.
Add /photos after the page ID and click Get /{pageId}/photos