Connect my webapp to the facebook api and write fql query using jquery

flyingkandi

so far I am following the facebook doc to get started to connect webapp to facebook api. but i am lost somewhere.

"<script>"
$(document).ready(function() {
    $.ajaxSetup({
        cache: true
    });
    $.getScript('//connect.facebook.net/en_US/sdk.js', function() {
        FB.init({
            appId: '{app-id}',
            version: 'v2.5' // or v2.0, v2.1, v2.2, v2.3
        });
        $('#loginbutton,#feedbutton').removeAttr('disabled');
        FB.getLoginStatus(updateStatusCallback);
    });
});
"</script>"
  1. where and how should i wright the fql query
  2. what is the access token, does it changes over time for same page.
  3. where should i give the access token to get the data from facebook.
flyingkandi
<html>
<head>
<meta charset="utf-8"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script>
</head>
<body style="background-color:#cfeae3;">
<script>

window.fbAsyncInit = function() {
FB.init({
    appId      : '<your app id>',
    xfbml      : true,
    version    : 'v2.5'
});
};  
    (function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function getData(){
    FB.getLoginStatus(function(response) {
    if (response.status == 'connected') {
     city = $('#city').val();    FB.api("<query>",function(responses){

    }else if (response.status === 'not_authorized') {
    alert("not auth");
    document.getElementById('response').innerHTML = 'not logged in' ;
    } else {
    alert("not conne");
        document.getElementById('response').innerHTML = 'not connected';
    }
});
}

</script>
<div class="container">
<div id="tfheader"  align="center">
<input type="text" class="tftextinput" name="q"   id= "city"/>
<input id="btn"  class="tfbutton" type="submit"  onclick="getData()" />
</div>
</body>
</html>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Facebook API: do a FQL query using Open Graph API

From Dev

Using Graph API instead of FQL for Facebook

From Dev

How To Retrive Facebook Profile Picture Comments using Graph API or FQL

From Dev

List Facebook Page events on website for a Venue using FQL or Graph API

From Dev

Unable to use FQL with my Facebook application

From Dev

How to get the privacy values with FQL query from stream table entries using a Facebook application?

From Dev

How to get the privacy values with FQL query from stream table entries using a Facebook application?

From Dev

How to search by category in Facebook API/FQL

From Dev

Accessing information from Facebook using fql

From Dev

How to make a Facebook FQL query to select all friends

From Dev

Facebook FQL "PLACE" query returning very few results

From Dev

Execute simple FQL query with spring-social-facebook in java

From Dev

how to write an fql query to list friends in a particular location

From Dev

Can I query the Facebook API and see a list of all of my Facebook App payments (not using Real-time payments)?

From Dev

Facebook Inbox with Fql

From Dev

Facebook Inbox with Fql

From Dev

FB Graph Api Search, convert FQL query to fetch nearby pages?

From Dev

FQL query to graph api v2.0 transform

From Dev

How to get list of all my facebook friends using facebook api?

From Dev

connect to restful api using Jquery to stream video

From Dev

Connect my API to HTML with J.Query/Ajax

From Dev

Connect my API to HTML with J.Query/Ajax

From Dev

I have started building a small webapp and using JSON API on Wordpress to pull in wordpress posts onto my small webapp

From Dev

Is Facebook shutting down its FQL?

From Dev

extract url from facebook FQL

From Dev

Facebook comment FQL and comment box

From Dev

FQL facebook people lives here

From Dev

Is Facebook shutting down its FQL?

From Dev

How to query page response time using Facebook API?

Related Related

  1. 1

    Facebook API: do a FQL query using Open Graph API

  2. 2

    Using Graph API instead of FQL for Facebook

  3. 3

    How To Retrive Facebook Profile Picture Comments using Graph API or FQL

  4. 4

    List Facebook Page events on website for a Venue using FQL or Graph API

  5. 5

    Unable to use FQL with my Facebook application

  6. 6

    How to get the privacy values with FQL query from stream table entries using a Facebook application?

  7. 7

    How to get the privacy values with FQL query from stream table entries using a Facebook application?

  8. 8

    How to search by category in Facebook API/FQL

  9. 9

    Accessing information from Facebook using fql

  10. 10

    How to make a Facebook FQL query to select all friends

  11. 11

    Facebook FQL "PLACE" query returning very few results

  12. 12

    Execute simple FQL query with spring-social-facebook in java

  13. 13

    how to write an fql query to list friends in a particular location

  14. 14

    Can I query the Facebook API and see a list of all of my Facebook App payments (not using Real-time payments)?

  15. 15

    Facebook Inbox with Fql

  16. 16

    Facebook Inbox with Fql

  17. 17

    FB Graph Api Search, convert FQL query to fetch nearby pages?

  18. 18

    FQL query to graph api v2.0 transform

  19. 19

    How to get list of all my facebook friends using facebook api?

  20. 20

    connect to restful api using Jquery to stream video

  21. 21

    Connect my API to HTML with J.Query/Ajax

  22. 22

    Connect my API to HTML with J.Query/Ajax

  23. 23

    I have started building a small webapp and using JSON API on Wordpress to pull in wordpress posts onto my small webapp

  24. 24

    Is Facebook shutting down its FQL?

  25. 25

    extract url from facebook FQL

  26. 26

    Facebook comment FQL and comment box

  27. 27

    FQL facebook people lives here

  28. 28

    Is Facebook shutting down its FQL?

  29. 29

    How to query page response time using Facebook API?

HotTag

Archive