FB keeps deleting my application. I am thinking that the likely problem is that we allow users to share their score result with their friends, i.e. the user can select group of people who are also in the same group, and the script will post on all of their walls. I don't think that app is acting in any way not in accordance with FB policy. My guess instead is that due to relatively high amounts of requests to post feed [some users can select 100 and more friends]. Can it be so? Is there a way to post multiple feeds in single request, in that case?
http://developers.facebook.com/docs/guides/policy/policy_checklist/
Ensure that the application "does not provide users with the option to publish more than one Stream story at a time."
The behavior that Facebook wants you to use is that a user posts something on his own profile to share it with multiple people. Posting the same story on multiple profiles at once is contrary to how the social channels are meant to be used.
Related
I have a contest App. And many users have installed the app. I have stored the offline_access tokens of these users. I want to send a message to all users of app at the end of contest. What is the best way to do it. Because when I do it in a while loop the page never loads and browser just shows loading animation gif on tab.
You don't even need the user access tokens to accomplish something similar to what you're trying to do.
First off, mass-wall posting is both a violation of the Facebook Platform Policies (specifically IV.2, IV.3), but it's also really spammy and users will react negatively, probably blocking your app and ultimately it may get banned from Facebook. So don't do that.
Instead, you should utilise the intended social channel for notifying users of new content, App to user Requests.
This is pretty simple to do, as per the Graph API docs for apprequests you just make the following API call:
https://graph.facebook.com/USERID/apprequests?app_access_token=APPTOKEN
Where USERID is each user's Facebook ID and APPTOKEN is always your applications unique access token (see the documentation here if you do not know how to obtain one of those). You will also need to include parameters such as message, which you can read more about in the docs.
Is there any way to post on user's wall as the Application and not as user?
It's hard to provide a definitive answer without some more context as to what sort of post you want to do, but the answer is probably no.
We dont provide a a mechanism for pages or applications to write on a users wall directly.
As a Page, you can post on your wall, and the messages you write will be shown to a subset of the users who have liked your page in the news feed.
As an application you can use stream.publish to post on the users wall/timeline with an application attribution. But it's not as the application per se.
With Timeline Apps you can use the Open Graph to publish actions the user has taken with your app, like Spotify does. So you're posting what the user has done with your app, rather than posting as the user.
HTH
I'd like to remove as much as possible of my history with a certain facebook user via the Facebook API.
I want to be able to remove photo tags, wallposts, messages that I am tagged in, or associated with the certain user.
Is this possible, and if yes; how?
Blocking the user will go a long way towards removing most connections with the person in quesion. Go to Account->Privacy Settings->Manage Block Lists, or go to the users profile and look for the "Report/Block" link under their friends/family lists.
This FAQ about blocking describes a little about what happens when you block someone. As far as photos goes, it's a little unclear:
Photos: If the blocked person tagged you in any photos before the block, you’ll still be able to see those photos. You might also see photos of the blocked person if they are tagged in another friend’s album, but you won’t be able to click on their name to see their profile.
You do automatically get un-tagged from all their photos when you block someone. I'm guessing wall posts you're tagged in are removed as well, although I only tested with photo tags.
As far as removing their posts to your wall, as Igy pointed out you can't write an app that uses the API to delete posts that it didn't create. So, what I would do is write an app that gets all the posts on your wall and filters them, something like this pseudo-code:
posts = api('/me/feed')
for each post in posts:
if post.from.id == [blocked persons id]:
output post.id
Post ID's from the Graph API are in the format USERID_POSTID, so there are two ID's separated by an underscore. So for each ID in the output, go to https://www.facebook.com/permalink.php?story_fbid=[POSTID]&id=[USERID] and manually delete the post by selecting "Remove post" from the little gear menu on the top right of the post. Use the paging data from your API request, or until and since parameters (which are just UNIX timestamps, or any string accepted by the strtotime function), as described on http://developers.facebook.com/docs/reference/api/ under "Paging", to get all posts going back until the beginning of your wall.
If you are wanting to automate this process to make it available to end users and not just yourself, there are technically several ways you could go about it, although they may or may not violate (Terms of use)[http://www.facebook.com/terms.php]:
[3.2] You will not collect users' content or information, or otherwise access Facebook, using automated means (such as harvesting bots, robots, spiders, or scrapers) without our permission.
I'm sure there are ways of implementing such an app that doesn't violate these terms, for example providing a link to the post so that they can delete it themselves, rather than automatically deleting them.
http://suicidemachine.org/
I'd look into their code.
From their FAQ on if you can make your own:
Theoretically yes! Practically no (or let's say, not yet)! You'd need a Linux WebServer (apache2) with perl and python modules (php should be installed as well). Further, you'll need VNC-server and Java packages by Sun to launch selenium-remote applets. If you feel like contributing and can convince us with decent programming skills, please get in contact with us via email. We don't make the source code publicly available, since Facebook, Twitter, Myspace and LinkedIn would figure out how the suicidemachine is working in detail! So, please do not contact us, if you work for one of these companies!
I'm not even sure (personally) why you'd want to do this, surely you'd either want to block the other user or just remove them as a friend, but to answer your question:
It's not possible to delete most types of content via the API unless the App ID you're using was the original creator of that content (e.g an app for posting to your wall can delete the posts it made, but not posts made by other apps or on the Facebook.com interface)
Check the documentation at http://developers.facebook.com/docs/reference/api/ - you can definitely remove likes and comments of photos and wall posts - there may be other ways to do this (e.g retroactively changing your RSVP status to an event both users went to)
I've been building a web app that uses facebook integration for easier registration/login and notifications for the users. However, for the notifications I want to be able to post to a users facebook wall when something happens on our site.
Really I see two possible problems with doing this. First being that the user will most likely not be logged in to our website when the notification needs to happen. Second I have not found a way to post to the feed using any identity other than the current logged in user.
So to reiterate exactly what I'm trying to do. When some action takes place on my site involving Bob, I want the websites application to post on Bobs wall notifying him of the action as if the application is one of Bobs friends. From some of the things I've seen while researching this, it seems as if facebook might not treat applications like users and I might have to go through a page to accomplish what I want. But really I'm ok with that.
What you need to do is to ask for the offline_access permission. Then you can store their graph id property after they login/authorize to your site's database. Then you just post to that graph id instead of instead of /me. In your case you would then POST a request to the "$user_graph_id/feed" endpoint with whatever parameters you usually have.
I am developing a web application that I want to integrate with both Twitter and Facebook. At a certain time, messages will automatically be published on every user's feed, for both their Twitter and Facebook accounts.
I am currently working on the Facebook component. I know that in order to post to a user's feed on Facebook they must grant my app the publish_stream permission. Suppose I have a database of many users who have granted this permission. I want to publish a message on all of their feeds (visible to their friends). do I need to go through the database one-by-one and do an API call to post the message for each of them? This is the only way I can think of at the moment to do this, and it seems excessive to do this especially as the database gets larger and larger.
Is there a more efficient way to do what I describe?
Thanks.
I say its the only way to do it - anyway - what you say looks like bulk messaging which might be thought as spam from facebook privacy policy point of view. If you want to use facebook's platform to do the spreading of the message, then create a facebook page and make your apps users to like that, otherwise you'll have to do it "by hand" - sending the message to each one of your users. This has a positive side effect - you can personalize the message for each of your user (mention their name, their friends name, etc), making your application more social.