How to use Facebook Application to write a notific

2019-08-25 06:19发布

问题:

i'm developing an application for a university exam, using Appengine and Gwt (Google products) and i'd like to implement Facebook this way: - give the ability to a FB user to login to the application through facebook (did this implementing the oAuth2.0 flow, so now i have the user's access token and his permissions) - since the application is for being notified when a professor publishes some material for his course (this is all handled by appengine), i'd like to notify the user when a professor publishes some material, through a wall post or a note from my application in a way that it writes to the user something about the new published material.

I've been looking through EVERY single resource online, and couldn't find an answer: a lot of similar questions but no answers.

Writing the POST is not a problem, and for the moment i'm trying with the api graph explorer. I manage to write on the user's wall/note as if he's writing himself or (if the user likes the application) write all the likers a wall post/note (but the same to everyone).

But i don't find a way to send personalized wall posts/notes to every user in response to some specific material published. FB doesn't allow to do this because is considered spamming?

回答1:

Does it help you? http://www.hiteshagrawal.com/java/publish-on-facebook-wall-using-java

I'm trying to do the same thing. An event in my webapp occurs and then a post in the user's wall is made by my app...

I've no tried this solution yet. As soon as you or me finish implementing it, let's update this node, right?



回答2:

You can't directly post things to your user's wall as a way of notifying them - wall posts are intended to be things the user posts from within your app (for instance, they find something in your app interesting and choose to share it with their friends, so they click a 'Share' button).

You could try using an App-Generated Request (http://developers.facebook.com/docs/channels/#requests). This will increment the user's Bookmark Counter, and when they click on it they will enter your app and you can show them the latest news.

OR, you could ask for the 'email' permission for your app, and send the user an email notification when something is new.