Sending Facebook app request using Tornado Framework - facebook

I am a student majoring in CS and very newbie to Facebook app development. I couldn't find any good resources online so, I was wondering how can I send an app request or a message using python tornado framework to targeted user? So far, I have my app access token but I couldn't get app request to work... I need some kind of reference to follow but I am not having good time finding one that is "SIMPLE" enough... Thanks!

Regardless of the backend framework, doing app invites is all client-side, so as long as you can stream out HTML from your server with the correct Javascript, then you'll be well on your way.
See: http://developers.facebook.com/docs/reference/dialogs/requests/ For information and examples can be found and played with in Javascript tool at: http://developers.facebook.com/tools/console/ click Examples, then click apprequests

Related

Web API FB OAuth? How would to go about implementing it in a SPA application?

Documentation on the net seems to be VERY scarce. The only option I can think of at the moment
is to have my SPA app break convention and to have the (initial) logged out page be different to the logged in one (eg my app).
My app is built using Durandal 2.0.0.
In one of my OAuth tests app's I've managed to implement this link successfully. But as Durandal does not work in the same way (Server-side controller, & razor views), I'm thoroughly confused in how to achieve what I want to.
I'd like to have my app remain a single page app. But I've got little to no experience with the OAuth SDK
My only requirement is that the user log into my app using his FB account.
I've had an initial stab at this using the FB java script API, and got it working, but after discussions with another developer this side, it doesn't seem like the purpose of the java script API is to facilitate secure application login's? As the way we had it, would allow any user to pass a valid fb userId, then he would be logged into our app. :/
How would I go about achieving this process flow in a Durandal/Web API Single Page App?
User logs in using fb ->
then on the server we get his fb userId ->
retrieve our internal appID
I'm not asking for a complete answer/for someone to do my work....
But any documentation to get me started/less confused would be greatly appreciated.
Here is a sample project which demonstrates how to use OAuth with Durandal and Web API:
DurandalAuth.
However there are some modifications in viewmodels needed, since router changed in Durandal 2.0.0.

Can I include Facebook login/API calls *without* hosting my web application online?

I'm having some trouble understanding the steps I need to take in order to make basic requests to the Facebook API. I've been reading the documentation, and having a play with the Graph Explorer, however I'm a little confused getting started.
I'm making a game application for a University submission, for which Facebook integration is a small but important part. I will be submitting this application on disk, and it will need to work when the HTML page is launched from this disk - this is where I'm getting a little stuck. I'm not sure if I'm overthinking this, but I seem to need to register as a Facebook Developer and set up an application domain. Is this necessary? I won't be able to host this application online, it will have to be submitted on disk.
So, my questions are -
Is it possible to include basic Facebook integration without hosting the application online? (Login, retrieval of a list of the user's friend's ids)
(If this is possible) what do I need to do to handle the basic 'setup' of Facebook integration? I've been looking at the Javascript SDK reference and I see I need to have my appId and channelUrl for the Loading and Initialization. I see the appId quite clearly in the App Dashboard, however it is the channelURL I am having trouble with.
I hope that makes sense :) Loading and initializing the framework and then making Graph API calls seems pretty straightforward - I'm just not sure if it's possible without hosting the application online.
Cheers!
Your page should at least be reachable via HTTP – so put a portable webserver (could be a portable Apache distribution, or something smaller) on your “disk” as well, and run your app using http://localhost/…. Add that same address (protocol and domain only, no path) in your app settings for “Website with Facebook login”.
And for the channelUrl, see https://developers.facebook.com/blog/post/2011/08/02/how-to--optimize-social-plugin-performance/

can web2py support RESTful api calls? if so any pointers on how to build one?I

I want to configure a simple webapplication to support an iphone app to connect with it in RESTFUL ways. Initially have a user login session enabled from the iphone to the web app. I'd like the iphone app to send a NSURL call to the webapp, with user and password and have the webapp respond if the suer exists or not. Pretty simple. And I want to do it with web2py. Is this possible? Any clues?
I think you should post it to web2py group on google groups.
web2py#googlegroups.com
I know this question is a bit old now, but Massimo recently posted a video demonstrating a new experimental RESTful API for web2py. See also the Google groups posting "video about new RESTful APIs" .

Creating Facebook App

Im new to facebook applications. I recently created a webapp that consisted of html & php. But recently Ive decided that integrating my webapp within facebook would be useful. Any tips on where to start? Ive looked over developers.facebook.com and im confused. It appears they are in the process of updating. Ive come across a few guides but there from a few years ago. This app will run completely within facebook and im probably gonna have to rewrite all the code. Any guides or suggestions?
Thanks!
You didn't specify the programming language you're using but if you're developing asp, start by looking into Facebook c# sdk here: http://facebooksdk.codeplex.com/
If you're using any other language (i.e. php), try looking into respective software dev. kits (i.e. facebook php sdk). They will facilitate your job in comparison to starting raw development all by yourself.
Tim, if you want to get into the business of working with Facebook, you need to know right away that they are always in the process of updating. That being said, you should learn some Facebook terminology so you can do more research and figure out what you want to do.
Applications that run within the Facebook interface are called Canvas Apps. Your application is hosted on your own server, and Facebook simply adds an iframe in their UI that points to your app's URL.
Another way to go to create a webapp that uses your own design, but still utilizes a single sign-on system from Facebook. This used to be called a Connect App but now they don't really have a name for it. Basically, you can use Facebook's authorization system to pull Facebook user data into your own database, which basically eliminates the need for a registration page. The authorization system prompts the user to allow your app to get specific data about them - once they authorize it, your app has access to do whatever the user gave it permission to do.
The best document to wrap your brain around is about authentication: http://developers.facebook.com/docs/authentication/
Give that a whirl, and good luck!

How to get facebook data from app?

I'm writing a sort of visualization desktop (non-web) application, just for fun.
However, ideally I'd want it to be able to pull information from the user's facebook account. (after getting its credentials, of course)
What's the best way to do this? Should I register a new 'facebook app' even though I'm not really making it web-based? I've never written a facebook app before.
I'm using Java as my prog language, btw.
Thanks!
Yes. Facebook supports desktop applications, but they must go through a special authentication mechanism. Essentially, the user will need to be directed to facebook through a web browser window as part of the authentication process.
Here is the documentation on the authentication process: http://wiki.developers.facebook.com/index.php/Login_Desktop_App
There is a relatively polished Java library for facebook here: http://code.google.com/p/facebook-java-api/
If the Java library above does not meets your needs, you can build an implementation on your own. Essentially, you will need to interact with the Facebook REST server, as described at the top of the page here: http://wiki.developers.facebook.com/index.php/API
Edit: After doing some more research I have a few more resources to provide:
Here is a list of some applications written using Java for facebook:
http://wiki.developers.facebook.com/index.php/Facebook_apps_written_in_Java
And there's even a neat desktop application that is open source here:
http://code.google.com/p/fb-photo-uploader/
Good luck!