开发者

Workflow for a message/item sending Facebook canvas app using new Request 2.0

开发者 https://www.devze.com 2023-04-05 18:22 出处:网络
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.

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:

  1. User arrives at app page. Logged in, permissions granted if needed
  2. User selects a graphic (via an html radio button form) to go along with message they enter into an html text form
  3. 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 开发者_Go百科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

0

精彩评论

暂无评论...
验证码 换一张
取 消