I'm developing a Facebook application and currently testing out the invite feature. There is a limit on the number of invites that a user can send out using an application, defined by Facebook. However, I need to test the invite function's callback processing, so I sent out 5 or 6 invites to my test FB accounts, and now it says I can't send any more invites for the day. I'm using <fb:request-form> and I need to debug the script to which this tag posts to. So how do I override this invite limit?
Have you tried contacting Facebook? Perhaps they will be willing to relax the restriction for your testing or may have an alternative testing environment without this restriction. You are not going to be able to bypass their server restrictions unless you use multiple accounts, which I would not recommend as you may trigger security measures they may have in place.
I think I found the answer. According to this post: http://www.facebook.com/topic.php?uid=2318966938&topic=4554 FB calculates the acceptance rates of your invites and decides how many invites an app can send out. So in the test account to which I sent the invites, I accept all the invites from my application. And now FB allows me to send more invites from my app.
Related
Has anybody yet a way to interact with an FB messenger bot without using real FB accounts? I want to do automated testing and obviously not use real accounts for that.
I was not able to figure out how to allow access to a page to 'test users' or create a test page and subscribe the test app to it.
Any ideas on how to do this?
I use a wee web app I made to act as a local version of the facebook messenger api server and run user actions.
https://github.com/Fraser-Greenlee/bot_tester
On it you can write a script to define new users and their actions.
From the Facebook developers dashboard, select your app and then Roles. From Roles you can add other Facebook users as test users. It was easiest for me to use the users facebook id. Adding by email did not always work for me.
I am not aware of how to access a Facebook bot without a Facebook account. I created several fake accounts and had my friends test the bot. After testing, I deleted the fake accounts.
For more information on setting up a bot see my article Facebook Bots for Fun and Profit
The example bot is DMS Software Bot
The source code is Github fb-robot
Testing fb bot with non-fb user is currently not supported. Following are the reasons:
fb messenger requires the user to be logged
fb creates page scope ids (PSID) for each user who is interacting with the bot and hence login on fb is required
Coming to your question on testing:
you can add fb users as tester to your page and your app. Explained here. For your app https://developers.facebook.com/apps/[app-id]/roles/
Once added they will be able to send message to your bot (page) from messenger
On another note, if you are using 3rd party apps to build your bot (eg: api.ai, wit.ai) they already have emulators within the app which makes testing easier.
One easy way to achieve automated testing for messenger bots atleast is to try to mimic a request coming from FB. You can just log the request you are getting to your bot to find the signature of the request that FB sends. Then you can just pretend to be FB by sending http requests with the same signature. You will also have to add in code to respond to these http requests with your reply instead of just sending the message to FB's send API.
So in node it would be something like
sendMessage(<your reply>);
res.send(<your reply>);
Now you have an automated way of sending and receiving messages which you can use for automated testing.
However I think the bigger challenge is coming up with enough test cases. You need to use a combination of clustering over available data and classification to generate new cases.
I have been working on a tool to make this easy. So if you are interested you can sign up for early access. http://ozz.ai
My latest project has (had) a requirement for the user to invite their friends to their online service. I discovered that, apparently, as of April 2015 with the new v2.0+ Facebook Graph API, you cannot actually get a list of friends for the user, unless those friends are already subscribed members of your app.
The scenario:
My app is a web service that lets the user collaborate on research work in a private group online. The user needs to
look up their list of friends,
set permissions their friend will have in the group, and
send them an invitation both join the service, and the specific group. (using a unique, one-time use link tied to each recipient)
The user would (ideally) receive an invitation with a specific link for them to not just become a subscriber of said online app, but specifically to join the group they were invited to (i.e. not just a generic "hey, check out this app" type of invitation).
The expectation:
The user doesn't care whether their friend is already a member of "MyApp.com". They expect to simply look up their friends just like they do today from their phone when they connect it to Facebook (makes all contacts available, regardless of whether those friends connected their Facebook to their phone, respectively). Likewise, compare inviting members to your Google docs, for example: look up your contact, set permission, send invite - so easy. Users demand this UX simplicity today and do not distinguish or care whether they are dealing with email, Facebook, Twitter contacts, whatever.
The problem:
The entire point of a social network is to be, well, social. If the Graph API only lets my app access friends that are ALREADY users of my app, it completely defeats the entire purpose - it cuts my user off at the knees, kills UX, no more ability to actually contact their own friends. My understanding is Facebook made this change to prevent developers from spamming users, and I get that, I completely support that. HOWEVER, my company and my app are not the ones that are trying to invite friends for it's own purposes, it is the USER and THEIR OWN friends that THEY have the right to access and converse with for their purposes (or so you'd think). Beyond just friends list, even if I had that, I think there are additional hurdles and limitations with posting messages to friends, even private (not wall) messages, which again would be anti-social.
The Question:
Am I understanding Facebook limitations properly, and if so, what is the work-around? I'd be ok with such an API being locked down until you pass a review that proves you aren't spamming users, but I did not see such an option.
Facebook supposedly prioritizes users over developers, and these changes were made because if the user is not comfortable with privacy (don't spam my friends), then they wont be users any longer, and that obviously affects developers and Facebook. OK, but did they not realize that by locking it down this extreme just killed UX for the user in legitimate scenarios? And to my original point, not just a little, but paramount - the result quite literally is that on April 30, 2015, Facebook became anti-social. Surely this is not inline with their mission. Surely there is a better approach.
If your app is not a game (which I assume), the only viable option would be the Message Dialog as desribed at
https://developers.facebook.com/docs/apps/faq#friend_invite
If your app is not a game and has a mobile or web presence:
You can also use the Message Dialog on iOS and Android, or the Send Dialog on Web. These products let a person send a message directly to their friends containing a link to your app. This type of message is a great channel for communicating with a smaller number of people in a direct way. The Message Dialog and the Send Dialog both include a typeahead which lets the person easily select a number of friends to receive the invite.
You might also find App Invites useful but I beleive it's only for iOS and Android apps and might not exactly fit your use case:
https://developers.facebook.com/docs/app-invites
App Invites are a content-rich, personal way for people to invite
their Facebook friends to a mobile app.
I am developing a web App for users who want to post the exact same thing on a given time on their own Facebook wall to make a message viral. Of course, considering they granted my app the permission to do so and signed up specifically for that matter. Also, the frequency of such a blast message would be rare, no more than once or twice a week.
I would like to know if anyone has any experience in doing this and what the limitations are since I can't find them on Facebook's developer support.
This type of behavior is discouraged by the Facebook ToS. Further, in order to publish to a user's feed you need to have a current access token for that user. If they are currently connected and using your app, you have access to those tokens and publishing should be possible but very well might get your app banned for ToS violation.
I have been searching so long bu could not find any suitable answer so if you have any idea it would be perfect.
In my app i have friendpicker controller it lists all my friends. When I select some of them and press done button I can successfully log the ones I selected. so there is no problem. But what i want to do is sending app request to the selected users. How can I do that? what I need is sending multiple app requests to the friends which are selected from the friendpicker. Thank you
(Facebook SDK 3.5)
You should design experiences into your app to allow users to send requests to friend to drive re-engagement. Some design experiences include giving users the ability to request gifts, accept gifts, or help them complete a mission in your app. For example in Diamond Dash you can send a life to a friend. If that friend has not been using the app for a while this could help re-engage them.
Another design experience to consider is to allow users invite their friends to use your app. For example, there are apps that ask users to rate the app after some time. If you wanted to build something similar to drive engagement you could ask users to invite their friends. Wherever you have a button or call to action to rate the app, think about adding a flow to invite friends.
These user-generated requests are initiated when the app enables the user to select one or more friends to send a request to.
We will walk you through the steps to send out an invite or a request:
Triggering when the invitation or request is sent
Sending the request
Sending additional data with the request, such as a virtual gift
See this tutorial: http://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/
This may help you.
I'm considering developing an app that asks users to invite friends to participate at first launch, using the Request dialog. (The Request dialog would have a prominent Skip button, in agreement with Facebook policy IV.4.)
Browsing this forum, it appears that there USED to be a "Developer Policy V.4" which, at one time, said this: "You must not prompt users to send invitations, requests, generate notifications, or use other Facebook communication channels immediately after a user allows access or returns to your application."
I no longer see language like that in the policies available here: http://developers.facebook.com/policy/
Does this mean that prompting users to send invitations at first launch is now allowed? Or am I simply overlooking some language in the new policies that forbids this?
I believe this was removed intentionally, as it clearly isn't in their updated developer policies. The only mention of that old policy I can find is here. That post also gives a good reasoning for the old policy:
When a user -- whether returning or
new -- visits your application, you
must allow the user to engage with
your application before asking him/her
to publish a stream story, send out
Requests, or use any other
communication channel. The intention
behind this policy is to give users
the opportunity to meaningfully
interact with an application before
being faced with the decision of
whether to communicate with friends.
The advice is still valid even if the policy is no longer in place - that you should give the user a chance to use and learn about your application before being prompted to share it. However, if you are building a game like Words With Friends where you need to play against one of your Facebook friends, then I think it would be fine (almost necessary) to invite friends right away, and this may be why Facebook removed this from their policy.
I think you will be fine if you prompt a user to send friend invites immediately, provided its not for the purpose of spamming other people to get them to use your app and that you provide a skip option.
Also, its sad that its near impossible to get a response from Facebook like you have seen with their forums.