$.ajax('http://twitter.com/friendships/exists.json?
user_a='+query1+'&user_b='+query2,
                        function(data,textdata)
                        {
                                var public_tweets = JSON.parse(data);

                                  if(public_tweets.text == 'true')
                                    {
                                      var newDiv = '<p>true</p>';
                                    }

                             $('#content').append(newDiv);

                                });
                        },text);

even this doesnt seem to work...

On Jun 6, 12:33 pm, grand_unifier <jijodasgu...@gmail.com> wrote:
> <!-- this is the javascript json parser function -->
>
>     <script type="text/javascript" src="../jquery-1.2.6.min.js">
>     </script>
>
>     <script type="text/javascript">
>     $(document).ready(function(){
>                 $('form#search').bind("submit", function(e){
>                         e.preventDefault();
>                         $('#content').html('');
>
>                         var query1 = urlencode($('input[name="user_a"]').val
> ()); //userA
>                         var query2 = urlencode($('input
> [name="user_b"]').val()); //userB
>                         var rpp = 20; //number of tweets to retrieve out
>
>                         $.getJSON('http://twitter.com/friendships/exists.json?
> user_a='+query1+'&user_b='+query2, function(data){
>                              if(data == 'true'){
>                              var newDiv = '<p>true</p>';}
>                              $('#content').append(newDiv);
>                            });
>                         });
>                 })
>
>           function urlencode(str) {
>             return escape(str).replace(/\+/g,'%2B').replace(/%20/g,
> '+').replace(/\*/g, '%2A').replace(/\//g, '%2F').replace(/@/g, '%40');
>           }
>     })
>
>     </script>
>
> <!-- javascript ends here -->
>
> this is a very basic code to check if two twitter users are friends or
> not.... the json will return true or false in'it.... but it does seem
> to work...its frustratin.....
> anyone got any idea why???

Reply via email to