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 3948458
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:22:38+00:00 2026-05-20T01:22:38+00:00

I have a simple iPhone application I am making that will upload pictures to

  • 0

I have a simple iPhone application I am making that will upload pictures to Facebook. To do this, I have to put multiple files on the server. From that, it will go to Facebook. I have my PHP code below that will do that server-side.

The problem is, when I put a variable in the array, it won’t work. I have tried all the different options and it’s not working out for me.

Any help is appreciated! Thanks.

$args = array(
'message' => 'Photo from the ******** iPhone Application.',
'$short_url' => '$short_url'
);

$url = 'https://graph.facebook.com/'.$album_id.'/photos?access_token='.$get_facebook_token;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
$data = curl_exec($ch);
//returns the photo id
print_r(json_decode($data,true));
  • 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-20T01:22:39+00:00Added an answer on May 20, 2026 at 1:22 am

    You are using single quotes were you probably should be using a variable directly or double quotes so the variable gets interpolated:

    $args = array(
        ...,
       "short_url" => "@$short_url",
    );
    

    Or something like that. Depends on the supposed form field names. And “@$var” probaby leads to a file upload with curl.

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

Sidebar

Related Questions

I have a simple iPhone application that is very similar to the Page Control
I'm working on a very simple iPhone app, that in the end will have
I have a fairly simple iPhone application that I want to have run on
In my iPhone application I have multiple class files, I have my main application's
I have developed an iPhone application that was rejected. With this application I offer
I am making a simple iphone application where I have certain textfields one below
I have a simple iPhone application that loads very quickly, so the splash screen
We have a fairly simple mobile application, completed for iPhone and Android that does
I have a simple iPhone application which uses OpenGL ES (v1) to draw a
I have developed a simple location aware iPhone application which is functionally working very

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.