Home » Php » php – How to use jQuery in a facebook application

php – How to use jQuery in a facebook application

Posted by: admin July 12, 2020 Leave a comment

Questions:

I finished my application in locale and I want to integrate it in Facebook creating an app. My application works well, but when I try to load it from Facebook it doen’t work.

I’ve read that there’s some problem including JavaScript that are not FBJS.

I’m not using the Facebook markup language but mine ( jQuery UI and simply html + php ).

Can someone provide me with a link to a guide that explains how to create an app that uses jQuery or other js framework?

How to&Answers:

Remember that when you code JavaScript for Facebook you must write it in a way that conforms to FBJS, their rationale is “We built FBJS to empower developers with all the functionality they need, and to protect our users’ privacy at the same time.”

FBJQRY, is a library that aims to provide jQuery-like syntax in FBJS, and may be the answer to your question for non-iframe Facebook Applications.

Answer:

You can include not-allowed-things like google maps, charts, JavaScript menus, etc in your app by using fb iframe tag and then manipulate the stuff accordingly 🙂

Answer:

You are not allowed to use jQuery or Prototype in a Facebook FBML application.

There may be technical ways around this, but as far as I know nobody has succeeded. Your application may be better suited to live outside of Facebook using Facebook connect.