1. #1
    Sencha User
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    257
    Vote Rating
    0
    gabrielstuff is on a distinguished road

      0  

    Question Using GraphAPI with Sencha Touch

    Using GraphAPI with Sencha Touch


    Hi Small World :)
    I am trying to use GRAPHAPI from facebook to generate nestedlist item.

    I use this very simple code :

    Code:
        <script>
            window.fbAsyncInit = function() {
            FB.init({appId: '142465915771077',
                     status: true,
                     cookie: true,
                     xfbml: true});
              
            FB.api('/me/feed/', function(response) {
                alert_message(response);
            });
            
          };
          (function() {
            var e = document.createElement('script');
            e.type = 'text/javascript';
            e.src = document.location.protocol +
              '//connect.facebook.net/en_US/all.js';
            e.async = true;
            document.getElementById('fb-root').appendChild(e);
          }());
          
           var alert_message = function(response){
                    for (var i=0, l=response.data.length; i<l; i++) {
                var post = response.data[i];
                if (post.message) {
                  alert('Message: ' + post.message);
                }
              }
              };
          
        </script>
    My question was as fellow. I am not use to Ext, and I was wondering how to add and includes the call to the facebook JS SDK. I actually was wondering if I should use the source and include them.
    Then I was trying to understand when to call my different function.

    I know it seams very blurry... but I am in this mood actually :)

    Thank to every one that will help :)

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,120
    Vote Rating
    508
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I'd suggest following whatever the FB library suggests in their sample code.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    257
    Vote Rating
    0
    gabrielstuff is on a distinguished road

      0  

    Thumbs up Nice proposal but... does it help ?

    Nice proposal but... does it help ?


    Hi evant !
    Nice to have my first talk with you.
    I've noticed that you are an active user. Actually I met ExtJS with one of your post as I was reading and searching about panel, tabs and framework. I discover ExtJS with the forum ^^

    Actually, I am already using sample code from facebook.
    The one above is one of them.

    All this code are working fine in a "classic" environment. Meaning, no ext-js lib inclusion and no separate script.

    My challenge here (a small one) is to be able to run it in the ExtJS (Sencha) environment.
    I've read carrefully the source of twitter app and twittmap app (also did the tut) but the way facebook js library is called cause me some difficulties.

    They speak about :

    The most efficient way to load the SDK in your site is to load it asynchronously so it does not block loading other elements of your page:
    That is what I am doing... but when I use the code that worked in a classic environnement it does not with Sencha.

    Hints ? help ?

    Thank you !

  4. #4
    Sencha User
    Join Date
    Jul 2010
    Location
    Paris, France
    Posts
    257
    Vote Rating
    0
    gabrielstuff is on a distinguished road

      0  

    Default


    Hi !
    Actually a simple call to
    Code:
    Ext.util.JSONP.request({
                    url: 'http://graph.facebook.com/106986762688577/feed/',
                    callbackKey: 'callback',
                    callback: function(data) {
                        data = data.data;
                        facebook.update(data);
                        }
                });
    was sufficient to what I need to do. Nevertheless I am still interesting to see how facebook connect, and Sencha Touch framework cohabitated.

Similar Threads

  1. Sencha Touch on iPhone v1 / iPod touch v1 ?
    By palnap in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 28 Oct 2010, 5:30 PM
  2. charting in sencha touch
    By fgeorge in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 9 Jul 2010, 12:34 AM
  3. Sencha touch localstorage
    By ssdesign in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 7 Jul 2010, 9:30 AM
  4. Need Sencha Touch development help
    By dhcharlie in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 5 Jul 2010, 10:54 PM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar