3

I have a site that allows users to create private content, kind of like a blog post, and then grant access to that content to specific facebook friends. I'm struggling with figuring out how to do invitations to the facebook friends so that the user doesn't have to copy & paste their page URL and manually send it to their friends.

This is the workflow I am trying to implement:

  1. John creates a new blog post on my site by filling out the form and selecting facebook friends who can view it. Susan is one of the selected friends.

  2. John submits the form. My site saves the blog post and generates a unique URL for the new post's page.

  3. John is then presented with Facebook's App Request dialog UI which is populated with the friends he previously selected. John confirms the dialog UI.

  4. Facebook's API takes over from here and sends the App Requests to each friend (including Susan).

  5. Susan launches Facebook from her iPhone (not Facebook.com, but rather the native iPhone facebook app).

  6. Susan sees that she has a new notification in the Facebook app that displays the App Request. She also sees the App Request in her news feed.

  7. Susan clicks the link in the App Request and is taken to the unique URL of the blog post that she was invited to.

Every time John creates a blog post and invites friends, this entire workflow process repeats. So, if John creates 2 blog posts and invites Susan to both of them, then Susan should receive two separate invites each having a unique URL.

I've implemented the App Request UI dialog with this code (from the Facebook JavaScript SDK):

function sendRequestToRecipients() {
   FB.ui({method: 'apprequests',
      message: 'Check out my new blog post',
      to: '499802820,499802852'  //list of selected Friend IDs go here
   }, requestCallback);
}

Now, the pieces that I can't figure out how to get working are these:

  1. When I try to use Facebook's App Request UI dialog, the invitation is only visible if the friend (Susan in the above example) goes to Facebook.com. It's not visible when she opens the Facebook iPhone app.

  2. I can't figure out how to send a unique URL with each App Request. It seems like the App Request UI dialog is designed to just send the URL to my registered facebook web app. For example, if my registered web app's URL is www.example.com, then that's what is used in the App Request. Instead, I need to be able to specify that the URL should be www.example.com/someRandomUniqueID

  3. It's critical that Susan's friends don't see the App Request post. It shouldn't show up as a timeline post or anything like that. Only Susan should be able to see her own App Request.

Is what I am trying to do even possible?

Stoop
  • 1,235
  • 3
  • 17
  • 23
  • What did you already do? – Frank van Puffelen Dec 06 '12 at 20:47
  • I haven't been able to successfully implement any of the invitation part because I can't get all 3 requirements to be met. When I try to use Facebook App Request dialog, the invitation is only visible if the friend goes to Facebook.com. It's not visible when they open the iPhone Facebook app. Also, I can't figure out how to send a unique URL with each App Request. It seems like the App Request dialog is designed to just send the URL to the registered facebook web app. – Stoop Dec 06 '12 at 20:56
  • Can you bring it back to a single question and accompany it with a code fragment illustrating what you are trying to do and where you are stuck? – Frank van Puffelen Dec 06 '12 at 21:19
  • Sure, I'll edit my questions and clean it up. It probably seems like I'm all over the place with my question, but I think it's because I'm still not sure if what I want to do is even possible. – Stoop Dec 06 '12 at 21:27
  • @FrankvanPuffelen I've edited my question in a way that I think is a little more clear in what I'm struggling with. Please let me know if I can still improve it. – Stoop Dec 06 '12 at 21:57
  • Are your iOS and Android settings for your app correct? – Igy Dec 06 '12 at 23:11
  • My app isn't a native iPhone or Android app. It's a web site. I've registered it in Facebook as a "Website with Facebook Login" app. – Stoop Dec 07 '12 at 14:24
  • it seems that facebook official mobile app refuses to get as notification the app requests from a non mobile facebook app (an app not configured as native mobile from developer console) – netalex Dec 05 '13 at 08:52
  • Were you able to make progress on your issue? I may be facing the same challenge that you are faced with now and am curious if you found a resolution. – David Robbins Jan 09 '14 at 15:53
  • @Stoop, What happened to this issue? I also face the same issue currently. Please share some advices how did you solve this issue. – Steve.NayLinAung Sep 28 '15 at 07:34

0 Answers0