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?
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.
Related
I have an app that allows users to share the page to specific users by clicking on check boxes next to their name and then doing a bunch of posts. I received an alert in February that said I would not be able to post to friends' walls unless there is a dialog box.
However, I noticed if you sign a petition on Causes.com, they do something very similar where they post the petition to a bunch of friends' walls.
I'm curious how they get away with that. Maybe I'm not familiar enough with the Facebook API.
I'm not sure if this helps, but Facebook does have business partnerships with certain sites/companies that have more privileges to their api keys, facebook app. This could be one of these instances.
One instance of this is, when you go to a major site and the site is able to read your facebook session, and within that site they show your name and picture once the site is rendered. In essence, these sites already know who you are.
As far as I know, you can only tag friends of the account associated with the access_token currently in use. This means that if I want to be able to make an app to share photos on facebook with a tagging functionality, it's mandatory that I make an authentication system, where the user needs to type his password to login on FB and I request and store his sixty_days_access_token. This approach is fine for web apps, but is troublesome if I have to implement a desktop touchscreen interface where the users interact with the system in an environment where anyone can watch him typing his user and password. I'm facing this problem with a public touchscreen, where the users can take pictures and send it to Facebook. The interface is implemented with C++ and the curl library. As the touch is in a very crowded environment and the screen is big, we experienced that the users are intimidated to enter his acc/pass. We worked around this problem by creating a fan page to the event where we store all the photos. As we already have the fan page admin access token stored, we don't need to login the users but clearly we are not able to tag any of the user friends, which vastly reduce the viralization potential of the solution.
So, having this problem in mind, how can I face this?
Do I really need to make an authentication of the users to be able to
tag their friends?
Is there any creative solution?
Yes, if you want to tag a user or their friends in a post, you need them to log in - this is a requirement of the Photo tagging API.
The only alternative i can think of is to give the user a URL they can go to later (e.g. on their phone or PC) which will prompt them to authorise your app and do the tagging at that time.
Is there a way (perhaps through a rest api or graph api) to allow a user of my application to write on a friends wall without the usual 'on behalf of' or posted by my application? I know many people will not authorize an application that can post on your behalf, but I'd still like my users to be able to easily write on friends walls (without leaving the game page). I'm fine with it not promoting my game in any way - it should look just like it would if done through Facebook's site. I know there is something like this for Google+ using their mobile restful interface. Is this possible for Facebook and if so, how?
No, I don’t think there is a way of doing that. If a user uses an app to create content, then it will show that he used this app.
This is my first post in this facebook's stackoverflow forum. My background is on wireless baseband prototyping on FPGA platform and do not have any prior experience with facebook development. Now i have a chance to work on social network related development work and i'm quite excited. Anyway above is just my background introduction.
Here i want to create a virtual Facebook user. Imagine you are interacting with your refrigerator on Facebook. This is the kind of concept we want to show.
Following are the functionality i would like to have at my virtual's facebook account..
1) recognize real friend check-in and messages posted on his/her wall.
2) ability to write messages on real friend's wall.
3) recognize messages posted on virtual account's wall.
4) ability to write message on virtual account wall.
How can the virtual account be equipped with such functionalities? Can i achieve by writing a facebook application? Please advise the direction i should look at.
Cheers,
Phone Naing
The facebook api lets you query their graph but it requires an access token to do that.
There are 3 main token types: User, Page and App.
Your app would be able to get an app token easily but it's limited to public data only, like data of public pages.
For a page and user tokens you'll need the actual user to interact with your app in order to get the token.
You can get the friends check-ins, feed, images, events and so on by asking for the right permissions from the user (there are user permissions and friends permissions).
You can also post to friends wall with the "publish_stream" permission.
For "recognizing" posted items on a user wall you can either recheck the user feed every once and a while and compare what you had and what you get or use the Real-time Updates.
With all of that said, I seriously doubt that you'll manage to pull something like that with the current limitations of the facebook api.
Let's start with the fact that facebook does not like profiles to be "vritual", they want the profiles to be of real people.
Of course that there are plenty of virtual profiles but they can remove them (and sometimes do).
Even if you do have these virtual profiles, since they are virtual they won't interact with your application using facebook, that is won't be logged in to facebook via their channels (web interface, android or iOS, etc).
Because of that you won't be able to get a user access token which you need for all of the information you want.
Since the deprecation of the offline_access permission there's no way to have a token which is valid for a user for more than about 2 months, which means that for each "virtual user" you'll need to log him in to facebook and then interact with your app to get a new token.
You can create a page instead of a virtual profile, which will also be fine with facebook.
But here again, you need a user to actually interact with facebook and your app to get a valid page access token, and even if you get that, it's not enough for the data you want to ask for.
To put it all together:
I think it can't be done.
Working on my second app and the first using the new Request 2.0 and other recent features.
I've managed to get the app to log a user in and grant the extended permissions.
My app is simple: I want a user to be able to send a message to a friend along with a user-selected graphic to go along with the message. I guess the basic metaphor is a gifting app.
I'm not wrapping my head around the workflow especially as examples using the new Request 2 dialog seem few and far between.
Here's what I'm thinking the beginning of the workflow looks like:
User arrives at app page. Logged in, permissions granted if needed
User selects a graphic (via an html radio button form) to go along with message they enter into an html text form
User selects friend(s) to send the message/graphic to.
I'm assuming I should toss the senderid, receiverid(s), link to graphic (or id), and message into a database.
How do I get the info from my users' selections? Does hitting Send Requests on the FB dialog POST the FB and form POST info to the same page so I can read them via PHP $_POST variables?
When the person receives the request, they accept it, but how do I get them to go through the requests outstanding and display the graphic and message? i.e. Archie logs in and has 6 friends sending him items through my app. How does he, in FB methods, see the message/items that Veronica, Betty and Jughead have sent him?
I don't mean that in a basic way. I know how to do this all if I was just writing a PHP app on my own site. I'd be finished in a few minutes. The part that's causing a head-shaped dent in my desk is trying to work out how it works adding Facebook to the workflow. I've been looking for examples and tutorials but they seem to be out-of-date to the new methods FB wants us to use.
Thanks for any pointers!
When a user follows a request you have access to that request ID. If you need to access additional requests the user needs to "Connect" with your app so you can read that info from the user object. The request ID for the acted upon request will be available to you on your canvas page and it will be up to you to develop a work flow that authenticates the user to be able to access any other requests for that user.
The related blog post that discusses the process is available here:
https://developers.facebook.com/blog/post/464