Jump to content

Update facebook status on an external site.

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
iConquest

iConquest

    Newbie

  • Members
  • PipPip
  • 18 posts
Edit: Scroll down to latest posts or click here:

http://forum.codecal...html#post188331

Edited by iConquest, 31 July 2009 - 08:08 AM.


#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Do you have it all installed correctly?

Are you designing for experience or for the ability? You could use Ping.fm / Update all of your social networks at once!

#3
iConquest

iConquest

    Newbie

  • Members
  • PipPip
  • 18 posts
I thought I installed it correctly and double checked but it still has the same error.

I'm doing it for the ability and the experience.

I don't want to update all social networking sites at the same time - I'd prefer to do them separately.

There is probably a much easier way to do what I'm trying to do; All I want is a box for me to put my status in and a button to submit it.

#4
iConquest

iConquest

    Newbie

  • Members
  • PipPip
  • 18 posts
Ok, I scrapped most of the stuff I did before and started from scratch. I've now got a page that will update my Facebook status:

<html>

<body>

<a href="http://www.facebook.com/authorize.php?api_key=API&v=1.0&ext_perm=publish_stream ">Click here if account is has not got extended permissions.</a><br /><br />

</body>

</html>


<?php


require_once('facebook.php');


$facebook = new Facebook('API','SECRET');


$fb_user = $facebook->require_login();


$facebook->api_client->users_setStatus('STATUS','','',1);

?>

Currently, whenever I load that page, it will post "STATUS" as my facebook message.

Is there a way to make a form on another page containing a text box and a submit button and whatever I write inside the box gets set as my facebook status?

#5
TkTech

TkTech

    The Crazy One

  • Moderators
  • 1,396 posts
OI, OI, OI, remove your **** keys boy.

#6
iConquest

iConquest

    Newbie

  • Members
  • PipPip
  • 18 posts

TkTech said:

OI, OI, OI, remove your **** keys boy.
Whoops, thanks.

#7
iConquest

iConquest

    Newbie

  • Members
  • PipPip
  • 18 posts
Update:
I wrote this:
<?php


require_once('facebook.php');


$facebook = new Facebook('API','SECRET');


$fb_user = $facebook->require_login();


$facebook->api_client->users_setStatus('". $_POST["status"] ."','','',1);

?>

But when I submit the form, it sets my facebook status as:

'". $_POST["status"] ."'

Instead of what I put in my textbox (with the name 'status').

Any ideas?

#8
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
I guess you should only use the $_POST["status"] as first parameter.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#9
iConquest

iConquest

    Newbie

  • Members
  • PipPip
  • 18 posts
Wow, I'm an idiot. Thanks Orjan :P

Loving my admin-y page:

Posted Image

#10
hunterbdb

hunterbdb

    Newbie

  • Members
  • Pip
  • 1 posts
Hey everyone, I have written a full ebook to teach you how to write facebook applications.

Here are some take-aways you get:
1. Covers 20+ functions with step by step instructions.
2. 3000+ lines of fully working example source code - 24 complete PHP facebook scripts.
3. Downloadable for offline browsing.
4. Written for start-up beginners AND seasoned PHP professionals.
5. Content is updated & appended with new content. You'll own access to knowledge about the latest additions to the facebook API.

try it out yourself. You'll be glad you did.

Thousands of developers support themselves with 6 digit incomes in the facebook app industry. See what it can do for you! It's a multi- million dollar industry!

Edited by Jaan, 28 October 2009 - 12:13 PM.
No advertising..


#11
nitestryker

nitestryker

    Newbie

  • Members
  • Pip
  • 1 posts
I tried to use the code above and it doesn't seem to work it will reload my page after authenticating and display auth token ex.( http://www.mywebsite...kfkfafd9393313f ) but it doesn't update my status and its not displaying and error messages can someone shed some light on why that might be.
i am using this code
<html>

<body>

<a href="http://www.facebook.com/authorize.php?api_key=API&v=1.0&ext_perm=publish_stream ">Click here if account is has not got extended permissions.</a><br /><br />

</body>

</html>

<?php 

require_once('facebook.php'); 

$facebook = new Facebook('mykey','mysecret'); 

$fb_user = $facebook->require_login(); 

$facebook->api_client->users_setStatus('STATUS','','',1);

?>