I'm new to programming Facebook apps but I think I have the general idea down. I'm creating an app that allows users to sign up and select friends to automatically send a birthday message on their birthdays. I know how to grab users and their birthdays, but how do I go about going through my database everyday, grabbing the birthdays and friends, and posting to their walls? I imagine it would take a cron job of sorts but how do I get around the permissions this way? Also, I want to post from the app, not my user account. Do I need to create a user account just for the app?
Thanks all.
You need the extended permissions offline_access and publish_stream to do what you are proposing.
Also research Facebook Platform Policies regarding prohibited actions such as filling the user message parameter, and how Facebook monitors user feedback to automatically ban applications that receive too many hides, blocks, spam reports, etc. Apps that abuse publish_stream and offline_access get shut down very quickly.
You do not need a user account just for the app.
And yes you need a way to run your program on a schedule if you don't want to have to remember to run it yourself every day. a cron job, a Windows Scheduled Task, or other scheduler will be required.
Related
Im toying around with integrating facbook into a website. Basically this website will generate acheivements for each user after X amount time (starting from a day up to a year).
I want to post these milestones to facebook automatically (with users prior permission). Does facebook allow this?
This article seems pretty darn explicit that its not.
But i have seen lots of posts on SO that are scheduling posts while trying to figure this out. Perhaps i have terminology's mixed up or something. Could someone explain this for me please.
If its not possible, does this mean that the only time an app can post to a users facebook wall is when the user explicitly clicks something to the effect of "post to my wall". Meaning they would need to login and manually approve every milestone?
Thanks
No, it's not possible to post something on behalf of a user automatically. According to the facebook's policy, even if a user grants you a publishing permission, actions you take on the user's behalf must be expected by the user, i.e. user must be aware of the actions you are taking on his behalf. As the article says, this can be done, for example, by prompting user with a dialog box with a link to Share a photo to their timeline each time your app would like to share to the user’s Stream.
Facebook however permits scheduled Page posts, but I guess this is not what you want. You can read more about it here.
I need to constantly poll for all posts that a group have people have posted mentioning a specific Facebook page. I have a user which has admin privileges to that page but is currently not friends with the group of people I need to poll. I need to do this as authenticating through my Facebook app without having people constantly enter their password. My understanding is that there is no way to do this without becoming friends with the entire group of people. Is that true?
Is it even possible to do this with becoming friends with the entire group of people (assuming that the group let's my user see their posts)? Will the group need to authenticate to my app at any point? What permissions does my app need?
I have the task to integrate some commercial sharing stuff into a website.
The idea is that the user a) logs in/registers in the website, b) the user connects his user account with his facebook account - by adding and accepting the website application.
Here comes the interesting part - is there a way of linking the facebook account with my website's account so that I can send them updates and promotions directly to their walls programatically?
In the application dialog, it's clearly noted that the user allows the application to write to the user wall so they accept and agree this. Then, for example, if I want to send them a promotion or update directly on their wall using the fb application api, how can I achieve this? All the tutorials I've read consider the user using the Facebook Login
The concrete idea is something like weekly promotion feed that my clients want to allow customers to allow being posted directly on their walls. As I don't have any experience with facebook development, I'd appreciate knowing how, if at all possible, this can be achieved?
Most of what you're suggesting is against policy, and isnt' technically possible either as users need to come back to the app once every 60 days for you to have a valid access_token for them.
The Authentication docs explain how to get access to a user's information with their permission, and the Permission documentation explains which permissions grant access to which functions or fields.
My app stores the Facebook Access Token for offline use. The main purpose of the app is to allow users to automatically posts on the walls of people within a specified number of days of their friends birthday.
My app has been blocked by Facebook due to spam (some users are sending marketing messages to their friends instead of using the app for it's purpose).
I want to find out who those users are and block their access to my application. The only problem is that my Facebook App has a few hundred access tokens (one for each user of my application). The insights dashboard does not provide me with stats per access token. I need to find out which of my users are getting their wall posts reported as spam.
Is there any way of doing this?
After appealing, Facebook has unblocked my application but I don't want it to happen again. As far as I can tell, I can find out the number of people who have reported the wall posts as spam...but I don't know which access token made those posts...and hence don't know which of my users is posting spam messages.
It's not Facebook job to keep track of your application internal activities. You should be logging every activity, at least posts ids returned when someone posts anything on their friends' wall.
And one more time... you DON'T need the offline_access permission to publish something when the user is offline!
According to the Facebook Platform Policies:
You must not pre-fill the user_message
parameter or content sent via an
extended permission (such as a status
update or note), unless the user
generated the content earlier in the
workflow.
Does that mean that I can't publish stories to the stream automatically, even if the user agreed to?
I've seen apps (such as PlayStation Network, Foto Diaria) that publish stories automatically.
PlayStation Network publishes stories about actions you did in PS3 games and Foto Diaria publishes a picture from your wall every day. In both cases the attachment is created by the application, and the user message is empty. Could that mean that publishing stories with an empty user message (empty, not absent) is not considered pre-filling?
EDIT: I need to know what is allowed or not by the Facebook Platform Policies, not how to post stories.
If you ask the user for the publish_stream extended permission then you'll be able to post automatically whilst the user is interacting with the application. You can pre-fill the user message only if it's something that the user has entered earlier in the process e.g. if you've asked them to comment on a piece of content and then publish a story about the comment. If in doubt, leave it blank.
If you want to publish automatically even when the user isn't online then you'll also need them to grant the application the offline_access extended permission. In this case you'll also need to store the session key that Facebook gives you for that user.
https://developers.facebook.com/docs/guides/policy/examples_and_explanations/stream_stories/
Check this out. The Platform policies section of the FB Dev site has some additional documents to allow you gain a better understanding of the guidelines for sharing.
Please also read the section about User Feedback.
https://developers.facebook.com/docs/guides/policy/examples_and_explanations/user_feedback/
Hope this helps.
We can ask user to grain of offline_access permission, which is access to user profile at anytime, even if user is not online. But this permission will no longer available.
I agree that this permission is so harmful to user.
But it still useful if owner app want to post to their own account during user use their app. If you want to post to your self account, you can manually grain offline_access to your app, and select access_token and keep it in your own app, and use it when you need to post your account. It make sense that Facebook should allow developer to do this task.
it is simply forbidden but, there is a catch about it, if is text prepared by user previously, you can post that text later and I think you are able to add your own text to that. But not so sure..
I'm saying this based on McDonald's Canada's yourquestions app, you can ask questions to them, whenever its answered they posting to your wall.
But to clarify that, as a PMD I'll ask to FB personally and let you know what is the answer is.