I am trying to create a request flow in our canvas app that uses frictionless requests to allow sending requests while in fullscreen.
The problem I don't see a solution for is how to detect when sending a request will pop up a UI dialog, and when it will not. If I send a request specifically to one or more users, and any one of them does not yet have frictionless requests turned on, I will need to break out of fullscreen so that the FB UI dialog can show.
However, if the user has previously sent requests and checked the frictionless checkbox, we don't need to break out of fullscreen.
How do I know whether or not a UI dialog is going to show? At first I thought that the hideFlashCallback could be used, but it seems like this is only fired for Facebook elements such as the notification panel, not for dialogs that the app itself initiates.
Thanks in advance for any assistance or ideas! I know that there are games on FB that handle this properly, but I cannot figure out how they are doing it.
As far as I'm aware there is no way to detect this via the API. You may be able to detect it in the DOM but you'd be opening yourself up for breakage with FB updates by using undocumented features.
What you could try is setting a timeout to break fullscreen and if your callback gets a response right away then you could cancel it. You'd have to fudge the timeout's duration based on how long the API usually takes to do the callback in frictionless requests but you could probably get this working with something like 250 or 500 milliseconds.
Related
I'm trying to create a page that requires visitors to 'Like' a Facebook Page before showing all the content.
The page with the like button is hosted on herokuapp.com but the URL to like is a Facebook page (ie. the host URL and the 'Like' URL are different).
I've successfully included a like button and I have subscribed to the edge.create event, and everything was working fine (I could write to console.log or run custom javascript) when clicking on the Like button.
However in the course of testing I've clicked Like/Unlike so many times that my site has now been flagged as potential clickjacking and the Like button now changes to 'Confirm' and asks the user to go through the Confirm dialog process.
I understand that I just need to accumulate more 'white' Likes and this dialog will go away eventually, but in the meantime it's causing me problems.
Basically, when I go through the 'Confirm' process in Google Chrome or on my iPhone, the 'Confirm' link never changes to 'Liked', the number of likes doesn't change and the edge.create event doesn't fire.
Has anyone else encountered this behaviour? I've read just about every post on Stack Overflow relating to either the Confirm process and edge.create but no one seems to have had this particular problem. I'd really appreciate any suggestions :)
I was able to resolve this problem by moving my app to be hosted my own domain instead of heroku, even though I was liking the same page. Not an ideal solution for everyone but it worked for me. In future I will create dummy apps and pages to test this process out.
I am trying to make a FB app which does the following:
i) The app is present on the page Tab. When the user click the pageTab, she is shown a screen[A1] where she can invite her friends to this app.
ii) When the friend gets the notification, she sees another screen [A2] which tells about the app.
What are the ways to do this?
I was wondering if there is a way to identify the source of the requests (other than the url on browser) to differentiate between the two requests to the Apps so that I can render the appropriate screens [A1] or [A2] based on if it is clicked from the PageTab or directly the invite notification.
Thank you.
See https://developers.facebook.com/docs/requests/, section „Accepting a User Request” – your app will get the request id(s), and can then read out the details of the request(s).
If the pure fact that the user came by your app following a request notification isn’t enough for you in your scenario, you can also pass an additional data parameter while making the request, read that out when processing the request, and let your app react accordingly.
And remember that it is your responsibility to delete requests once the user has acted upon them. (Also described in detail in the documentation.)
We are making a Facebook app and want to integrate Facebook Friendselector.
The guys who are making the app tell me that starting 1/4/2012 we can only invite 1 friend at a time. Is this true? And what can we do about it? We want to select multiple friends.
I'm not sure where those "guys" get their info, but there's nothing about this in the Developer Roadmap, or in the documentation of the Requests Dialog itself.
Maybe they were referring to the Send Dialog which indeed can only be used for one friend (though the user can then add more on his own), but even if they were talking about this dialog, then you don't have to use this one, you can stay with the Requests Dialog.
I've messed around with FBML (deprecated, I know) and the newer HTML5 code to no end, but so far I haven't found any way to do what I'm looking to do.
When using "apprequest" within an application on Facebook (within iframe), I can allow users to share requests to join the app, but those messages that get sent are very hidden away. They don't seem to appear in the newsfeed for shared recipients, and we're afraid users won't see the request from their friends.
Instead, we thought we'd allow users to alternatively share to their friends with the "send" button code that Facebook offers up. This allows us to specify a URL (we were thinking the app canvas URL or page tab it would live on).
So far, this is all I could generate...
Is there any way to have the send code let me specify that we want faces with checkboxes for uses to select their friends, instead of a sharing party needing to type out names of their friends by hand? There's got to be some easy way of doing this.
Stop me if you think I'm going in the wrong direction on this. Maybe there's a better way that I'm simply not thinking of.
Here's an example of the checkbox functionality I'm referring to...
This violates the browser security model and also Facebook's policies, you can include a to parameter with the send dialog to preselect one recipient, but you can't modify the browser DOM because the Facebook dialog is in an iframe
I am making an application in which i have to show user location url in twitter, i have successfully integrated twitter api and url gets post whenever signed in and clicked tweet, however is there any way when user clicks on home button, then in background process url gets updated in twitter, please hep me regarding this issue
The applicationWillResignActive: method will get called if the user hits the home button (or gets interrupted by a phone call, etc)
In that handler you could do a POST to Twitter. I think that would be a small enough task that it wouldn't be disruptive or against the intended use of that method.
Since only certain activities are permitted in the background (location, music, etc)...you'd have to piggyback on one of those...since you're tweeting location it makes sense to use that one, so perhaps you could use signigificant location changes, and tweet on each locationDidUpdate?
You can't post a request in the background every N minutes.
The only thing you can do is have some time when the app goes to the background to finish something you've started, like, say, if you started a download request and the user clicks the Home button, you have some time to finish the request.
One this time is done, your app is sleeping.
But you may register to have a notification that may wake up your app on significant location changes. This should be helpful if your aim is to tweet your position every time you move significantly.