Post text in facebook notes and datebase

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
niki_noki
Forum Newbie
Posts: 17
Joined: Tue Aug 16, 2011 8:58 am

Post text in facebook notes and datebase

Post by niki_noki »

Hello ! :)

I have any question. Can I publish note in facebook and in my database with php ?
niki_noki
Forum Newbie
Posts: 17
Joined: Tue Aug 16, 2011 8:58 am

Re: Post text in facebook notes and datebase

Post by niki_noki »

Any ideas how do make this code? :(
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: Post text in facebook notes and datebase

Post by phphelpme »

I dont get what you are trying to do here?

You need to be more specific because you can post in two places yeah by saving content as string variable and posting to another site and your database.

Best wishes
niki_noki
Forum Newbie
Posts: 17
Joined: Tue Aug 16, 2011 8:58 am

Re: Post text in facebook notes and datebase

Post by niki_noki »

I want to post notes in facebook with php code on my site. How to make this code?
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: Post text in facebook notes and datebase

Post by phphelpme »

Code: Select all

try {        $statusUpdate = $facebook->api('/me/feed', 'post',                  array('name'=>'My APP on Facebook','message'=> 'I am here working',                  'privacy'=> array('value'=>'CUSTOM','friends'=>'SELF'),                  'description'=>'testing my description',                  'picture'=>'https://something.net/mypicture.gif',                  'caption'=>'apps.facebook.com/myapp','link'=>'http://apps.facebook.com/myapp'));  } catch (FacebookApiException $e) {       d($e); } 
I strongly suggest you look into the Facebook API documentation.

Check out their developer website: http://developers.facebook.com/

Best wishes
niki_noki
Forum Newbie
Posts: 17
Joined: Tue Aug 16, 2011 8:58 am

Re: Post text in facebook notes and datebase

Post by niki_noki »

phphelpme wrote:

Code: Select all

try {        $statusUpdate = $facebook->api('/me/feed', 'post',                  array('name'=>'My APP on Facebook','message'=> 'I am here working',                  'privacy'=> array('value'=>'CUSTOM','friends'=>'SELF'),                  'description'=>'testing my description',                  'picture'=>'https://something.net/mypicture.gif',                  'caption'=>'apps.facebook.com/myapp','link'=>'http://apps.facebook.com/myapp'));  } catch (FacebookApiException $e) {       d($e); } 
I strongly suggest you look into the Facebook API documentation.


Best wishes
Fatal error: Call to a member function api() on a non-objec
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: Post text in facebook notes and datebase

Post by phphelpme »

You need to develop an API app for facebook to do this with from your website.

I have not got the time to do this for you.

Look into the facebook development and you should find all the coding you need then you just get it to work with your site.

Best wishes
User avatar
phazorRise
Forum Contributor
Posts: 134
Joined: Mon Dec 27, 2010 7:58 am

Re: Post text in facebook notes and datebase

Post by phazorRise »

you need facebook php sdk.
https://github.com/facebook/php-sdk
documentation is also available at https://developers.facebook.com
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: Post text in facebook notes and datebase

Post by phphelpme »

Thanks phazorrise,

Should have given that link to the library. lol

Best wishes
niki_noki
Forum Newbie
Posts: 17
Joined: Tue Aug 16, 2011 8:58 am

Re: Post text in facebook notes and datebase

Post by niki_noki »

phazorRise wrote:you need facebook php sdk.
https://github.com/facebook/php-sdk
documentation is also available at https://developers.facebook.com
And now what can I do? :|
User avatar
phazorRise
Forum Contributor
Posts: 134
Joined: Mon Dec 27, 2010 7:58 am

Re: Post text in facebook notes and datebase

Post by phazorRise »

setup your site with php sdk.
https://developers.facebook.com/setup/ here, you'll get appId and secrete key for your site.
and you can use Graph API for updating status some other stuff. https://developers.facebook.com/setup/ itself shows tutorials on how tos !
Post Reply