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

  • SEARCH
  • Home
  • 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 6959121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:13:51+00:00 2026-05-27T15:13:51+00:00

I am trying to create a dynamic image of my friends using PHP’s GD

  • 0

I am trying to create a dynamic image of my friends using PHP’s GD Library, and I need to upload this to my Friends Profile but I keep getting an Error
Fatal error: Uncaught CurlException: 26: couldn’t open file “” thrown in /home/p170r760/public_html/myfbapps/mysupporters/base_facebook.php on line 820

$image = imagecreatetruecolor(500, 500);
$orange = imagecolorallocate($image, 0xFF, 0x8c, 0x00);
$bg = imagecreatefromjpeg('app2_bg.jpg');
imagesettile($image, $bg);
imagefilledrectangle($image, 0, 0, 499, 499, IMG_COLOR_TILED);
$font_file = 'TURNBB__.TTF';
imagefttext($image, 20, 0, 105, 50, $orange, $font_file, 'My Top Supporters');
for($i=0;$i<5;$i++) {
imagefttext($image, 13, 0, 10, (100+($i*80)), $orange, $font_file,'Rank #'.($i+1).':');
imagefttext($image, 13, 0, 250, (100+($i*80)), $orange, $font_file, $mutual_friends[$i]  ['name']);
$frnd_pic=$facebook->api('/'.$mutual_friends[$i]['id'].'?fields=picture&type=square');
$frnd = imagecreatefromstring(file_get_contents($frnd_pic['picture']));
imagecopymerge($image,$frnd,150,(80+($i*80)),0,0,50,50,100);
$tags[] = array(
       'tag_uid' => $mutual_friends[$i]['id'], /*Current user’s id*/
       'x' => (150/5),
       'y' => ((80+($i*80))/5)
   );  
}
imagepng($image, '/img/' . $me['id'] . '.png');
$pic = realpath("/home/p170r760/public_html/myfbapps/mysupporters/" . $me['id'] .  '.png');
$facebook->setFileUploadSupport("http://" . $_SERVER['SERVER_NAME']);
$pic_id = $facebook->api('/me/photos', 'POST', array('message' => 'My Top Supporters',
'source' => '@' . $pic,
'tags' => $tags));
 imagedestroy($image);
 ?>

Can anyone please tell me where am I going wrong?

  • 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-05-27T15:13:52+00:00Added an answer on May 27, 2026 at 3:13 pm

    The setfileUploadSupport API you used is not supported by PHP SDK 3.1 in line

     $facebook->setFileUploadSupport("http://" . $_SERVER['SERVER_NAME']);
    

    Change it

     $facebook->setFileUploadSupport(true)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a dynamic image that will be created from PHP
I am trying to create dynamic menus from the database using the following example
I am trying to create a dynamic range using Excel functions that will sum
I'm trying to create a dynamic grid using ExtJS. The grid is built and
I am trying to create a dynamic bar in HTML using javascript. I have
I am trying to create dynamic subdomains in .htaccess. I want something like this:
I am trying to create a dynamic CSS file using the Django templating engine
I am getting the following error when trying to upload an image using paperclip
I'm trying to create dynamic balls by using a for loop. For some reason
I am trying to create a dynamic set of dropdown boxes, using jQuery/AJAX and

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.