SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    facebook application problem?

    you can see this: http://disavur.com/facebook
    this is my code:

    PHP Code:
    $user $facebook->getUser();

    if(
    $user) { 
        try {
           
    $statusUpdate $facebook->api('/me/feed''post',
                     array(
    'name'=>'My APP on Facebook','message'=> 'I am here working',
                     
    'privacy'=> array('value'=>'CUSTOM','friends'=>'SELF'),
                     
    'description'=>'testing my description',
                     
    'picture'=>'https://fbcdn-photos-a.akamaihd.net/mypicture.gif',
                     
    'caption'=>'apps.facebook.com/myapp','link'=>'http://apps.facebook.com/myapp'));
         } catch (
    FacebookApiException $e) {
              echo 
    "error";;
        }
    }
    else
    {

        echo 
    "<a href='" $facebook->getLoginUrl() . "'>login</a>";

    This code returning "error".. Where is the error?

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    69 Post(s)
    Tagged
    0 Thread(s)
    It's not returning error for me...
    what you might want to do though is var_dump($e) instead of just echoing "error"..

  3. #3
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    echo "error";; line have double semicolens


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •