Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8210027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:56:08+00:00 2026-06-07T09:56:08+00:00

I am posting images through my app to users wall on their behalf (they

  • 0

I am posting images through my app to users wall on their behalf (they step in front of a camera at events). MY app was working successfully last week now its not working and reporting “Got EOF while waiting for outstanding responses”.

There is a related bug report but its for an iphone app while mine is a web based php.

Can anyone shed light on this error message? my code is below but its broken down a lot for pic processing and db calls..

//initial calling code

$data = array('title' => $station_info->title,
              'message' => $station_info->message,
              'token' => $result['access_token'],
              'item' => $item,
              'pic_source' => $image,
              'fb_id' => $result['fb_id'],
              'album_id' => $station_info->pic_station_album_id,
              'user_id' => $user_id_data['id'],
              );

//$result = $this->__do_facebook_image_post($data);     
$feedback = "FACEBOOKIMG: " . $this->__do_facebook_image_post($data, 'x');  

///processing code


private function __do_facebook_image_post($data,$type = "normal"){

        $attachment =  array(
                'title' => $data['title'],
                'message' => $data['message'],
                'token' => $data['token']
        );

        if($type =="normal"){

            $folder = "webcam";
        }else if($type="x"){
            $folder = "x";

        }


        $upload_path = FCPATH . "/pic_uploads/".$folder."/".$data['item'];

        echo $upload_path;


        if(is_file($upload_path))
        {       
            $attachment['source'] =  '@' . realpath(FCPATH . "/img_uploads/".$folder."/". $upload_path);            
        }
        else
        {           
            $attachment['source'] =  '@' . realpath(FCPATH . "/img_uploads/".$folder."/". $data['pic_source']);         
        }

        return $this->facebook_img_post($data['fb_id'],$attachment,$this->__get_facebook_album_id($data['album_id'],$data['user_id'],$data['token']),$data['token']);

    }



private function __do_facebook_image_post($data,$type = "normal"){

        $attachment =  array(
                'title' => $data['title'],
                'message' => $data['message'],
                'token' => $data['token']
        );

        if($type =="normal"){

            $folder = "webcam";
        }else if($type="x"){
            $folder = "x";

        }


        $upload_path = FCPATH . "/pic_uploads/".$folder."/".$data['item'];

        echo $upload_path;


        if(is_file($upload_path))
        {       
            $attachment['source'] =  '@' . realpath(FCPATH . "/img_uploads/".$folder."/". $upload_path);            
        }
        else
        {           
            $attachment['source'] =  '@' . realpath(FCPATH . "/img_uploads/".$folder."/". $data['pic_source']);         
        }

        return $this->facebook_img_post($data['fb_id'],$attachment,$this->__get_facebook_album_id($data['album_id'],$data['user_id'],$data['token']),$data['token']);

    }


private function __post_to_facebook($url,$attachment)
    {   
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL,$url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // This i added as the URL is https
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);      // This i added as the URL is https
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        curl_setopt($ch, CURLOPT_POST, true); // Do I need this ?
        curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
        $result= curl_exec($ch);
        curl_close ($ch);   

        return $result;
    }

    function facebook_img_post($fb_id,$data,$album_id ='')
    {


        if(!empty($album_id)){
            $url = "https://graph.facebook.com/".$album_id."/photos";   
        }else{
            $url = "https://graph.facebook.com/".$fb_id."/photos";
        }       

        $attachment =  array(
            'access_token' => $data['token'],
            'message'=> $data['message'],
            'source' => $data['source'] . ";type=".get_mime_by_extension($data['source'])
        );

        return $this->__post_to_facebook($url,$attachment);     
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:56:10+00:00Added an answer on June 7, 2026 at 9:56 am

    The error message that got returned didn’t really match the problem.

    I fixed this error as I was trying to upload a photo but was not passing the correct file path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem when posting video through my app on users with TimeLine
Posting this one for a friend. They have an Icefaces app that uses Icefaces's
It came to my attention a while ago that some people were posting images
I have seen many posting this issue in SO. I have gone through those
I posting my value through ajax and using the response the details will be
I am posting to the Facebook feed of user through the following code. 70
The website is intended for users to enable them joining the courses and posting
I would like to store images that users upload and retrieve them upon request
This is my first time posting on Stackoverflow, but I've been reading through many
HI all, can we post images with tweets in twittter through code in iphone????

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.