1

My Facebook app publishes a story to the user wall with an http post:

$args = array('access_token' => $ACCESS_TOKEN,
              'message' => 'testing message',
              'picture' => $appin_logo,
              'link' => $appin_canvas_url,
              'name' => $appin_name,
              'caption' => $post_score,
              'description' => $post_rfs,
              );
               $ch = curl_init();  $url = 'https://graph.facebook.com/me/feed';  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);  curl_close($ch);

That works all fine, except for one thing: $post_rfs is an array. I'd like to output its values in a neat way, with a comma after every value i.e.. What should I do?

Thanks in advance.

1 Answer 1

2

Try this:

implode(', ', array_values($post_rfs));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.