Tips for using Java to develop Facebook web apps

Source: Internet
Author: User
Tags documentation

Daniel wrote on July 25, 2007.

When you want to write a Facebook application in Java? You download the relevant Java class library by adding a program development module to your Facebook account. Suddenly you find that you have to stop: develop the relevant introductory introduction, sample code and documentation instructions where? This frustration is infuriating and ultimately leads you to give up.

"I think the lack of good Java development-related documentation is disturbing," he said.

Hopefully, someone will write a good introductory guide to application Java Development Facebook apps as soon as possible. Maybe you just want to give me some good chocolate, we can write some related documents, and frankly we have solved a lot of related problems. Here are some tips to help you start your Facebook application with java. This is not a complete introductory guide, but he can help you take less detours when you start.

Eight considerations to help you build a Java/facebook application

1. For your happiness and health, it is recommended that you use a 5.0 or higher JDK development package.

2. Do not look at the example in the Facebook Java development Package, as those examples are for Java desktop applications. And usually you need to write a Web application, the difference between the two applications is very large. In the beginning, you need a Web application service container, you can choose Tomcat, but I won't, there is another story, I will find a suitable time to tell you. Facebook has an uncommon calling pattern for Web apps. Most of your pages will be called by Facebook. Users request a Facebook page, and the main content in the page is returned to the user from your server. Your decency will be merged into Facebook pages and returned to the user. In most cases, these processes do not require your intervention to perform well. But note that javascript on your server-generated pages is not executable, which means that normal Ajax is no longer applied to Facebook. If you need to use AJAX technology to implement the Mock-ajax functionality that Facebook offers, you'll need to jump to the General page on your service adapter via Facebook's page.

3. Configure your application on Facebook

Don't forget to fill in the Facebook application configuration file, you should set:

The callback URL for the application.

The name of the application-this name is used to indicate the page that is marked on Facebook. (These pages can be embedded into the Facebook navigation page with an IFRAME, or it can be a page marked with FBML.) A set, such as Http://apps.facebook.com/yourappname/yourpagename, will generate a request from Facebok to your server. For new users, this is a welcome page for your application that invites users to use to spread your application.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.