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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:59:04+00:00 2026-05-22T12:59:04+00:00

i am using a twitter script to post messages to the twitter wall from

  • 0

i am using a twitter script to post messages to the twitter wall from a html form
see here:

 <form name="csp_post" action="/test.php" method="post" >
 <textarea name="text" id="text" rows="3" cols="64" ></textarea>
 <input type="hidden" name="action" value="post">
<?php session_start();

include 'twitter-oauth/lib/EpiCurl.php';
include 'twitter-oauth/lib/EpiOAuth.php';
include 'twitter-oauth/lib/EpiTwitter.php';
include 'twitter-oauth/lib/secret.php';

$twitterObj = new EpiTwitter($consumer_key, $consumer_secret);

if(isset($_SESSION['oauth_token'])){
$oauth_token = $_SESSION['oauth_token'];
} 
else {
$oauth_token = $_GET['oauth_token'];
$_SESSION['oauth_token']=$_GET['oauth_token'];
}

$oauth_token = $_GET['oauth_token'];

if($oauth_token == '')
  { 
    $url = $twitterObj->getAuthorizationUrl();
    echo "<div style='width:auto;margin-top:10px;margin-left:10px;margin-right:auto'>";
    echo "<a href='$url'>Sign In with Twitter to post Comments</a>";
    echo "</div>";
 } 
else
  {
    echo "<div style='width:auto;margin-top:10px;margin-left:10px;margin-right:auto'>";
    echo "Your comments are now being posted on Twitter";
    echo "</div>";
    $twitterObj->setToken($_GET['oauth_token']);
    $token = $twitterObj->getAccessToken();
    $twitterObj->setToken($token->oauth_token, $token->oauth_token_secret);     
    $_SESSION['ot'] = $token->oauth_token;
    $_SESSION['ots'] = $token->oauth_token_secret;
    $twitterInfo= $twitterObj->get_accountVerify_credentials();
    $twitterInfo->response;

    $username = $twitterInfo->screen_name;
    $profilepic = $twitterInfo->profile_image_url;
 } 

if(isset($_POST['cssp']))
  {
    $msg = $_REQUEST['text'];

    $twitterObj->setToken($_SESSION['ot'], $_SESSION['ots']);
    $update_status = $twitterObj->post_statusesUpdate(array('status' => $msg));
    $temp = $update_status->response;
    echo "<div align='center'>Updated your Timeline Successfully .</div>";
  }
?> 

    <input type='image' src='../images/123.gif' rel='submit' border='0' value='Tweet' name='cssp' id='cssp' alt='Share'/>
  </form>

so the twitter will grab whatever i post into the text area and post it onto the wall.

i would like to do the same with facebook. I know there are applications that can do the same thing, but the ones i found uses a different textarea, and i want to use the one i have already.

any ideas?
Thanks

  • 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-22T12:59:04+00:00Added an answer on May 22, 2026 at 12:59 pm

    You can use the Facebook Graph API for this (documentation: http://developers.facebook.com/docs/reference/api/), specifically the following function:
    http://developers.facebook.com/docs/reference/api/post/

    Read the bottom of the page, the block named Publishing, this should do what you want.

    To authenticate using the account to your choice, you will have to use OAuth (http://developers.facebook.com/docs/authentication/); this is rather complex so I would highly recommend using a library for this, preferably Facebooks own PHP Library: https://github.com/facebook/php-sdk/

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

Sidebar

Related Questions

I am writing a python script on Linux for twitter post using API, Is
Trends data from Twitter Search API in JSON. Grabbing the file using: $jsonurl =
i am using a php script to automate posts to twitter. the script to
I'm using this PHP class for a Twitter script: twitter.slawcup.com/twitter.class.phps The script is: $t=
I'm using jQuery's ajax methods to interact with the Twitter REST API . Their
I'm detecting @replies in a Twitter stream with the following PHP code using regexes.
Using ASP.NET MVC there are situations (such as form submission) that may require a
For the API script of followcost.com. It is given that for using the follow
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.

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.