tailieunhanh - Facebook API Developers Guide PHẦN 6

nó thú vị để xem những gì mà cộng đồng các nhà phát triển là yêu cầu để được bao gồm. Bạn có thể xem và thêm vào những yêu cầu này tại . Nếu bạn tìm thấy một số các mô tả và ví dụ không đủ, xin vui lòng tham khảo tài liệu chính thức cho các thẻ. Tag FBML được thiết lập ngoài | Learning Facebook Platform Fundamentals 63 clickrewriteid clickResults clickrewriteurl your_callback_domain clicktoshow thumper click me a div id clickResults div This type of interaction is very useful and it will be able to handle most of the basic types of information retrieval you might need in your application. However you might find that simply echoing results to the page falls a bit short of your needs. To develop more robust Facebook features that leverage JavaScript-style code Facebook has developed the Facebook JavaScript language which I ll cover next. Facebook JavaScript Primer As I stated earlier Facebook will strip most JavaScript from your code because of security concerns. However the Facebook developers realized that JavaScript is useful for developing enriched user interfaces. As a result Facebook created its own version of JavaScript called Facebook JavaScript. However I should note that FBJS is still currently in beta and subject to change. If you ve developed for other social web sites that allow you to use JavaScript you know that they force you to use iframes in order to isolate their code. Facebook however takes a different tact for dealing with JavaScript. It takes its FBJS parses the code and prepends functions and variable names with your application identifier. For example the following function say_hello name var my_string this is a sample. return my_string name is translated into this function app_id _say_hello app_id _name var app_id _my_string this is a sample. return app_id _my_string app_id _name There are a few things to keep in mind when you are using FBJS in your applications. For instance depending on the area your application resides in your scripts will perform differently. Let s look at the following example from the Facebook wiki Graham 64 Learning Facebook Platform Fundamentals a href id hello onclick hello_world this return false Hello World a script d - function random_int lo hi return

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.