Solved

How to upload at facebook news feed section

Posted on 2010-11-23
2
442 Views
Last Modified: 2013-11-13
Hello Sir

I want to upload any file at facebook news feed option.Means when i upload any file at server from my website that time it shall also upload at facebook news feed section.Then please guide to me how to do this.
Regards,
Aasim afridi
0
Comment
Question by:rAfridi
2 Comments
 
LVL 2

Accepted Solution

by:
karthi4all earned 500 total points
ID: 34203034
1.Use the facebook php sdk, from
https://github.com/facebook/php-sdk/

2.settup an application profile

http://www.facebook.com/developers/


3, here is the code to post to wall

 public function postToWall($id, $message, $picture, $link, $name, $description) {
        try {
           $fb=new Facebook();
            $result = $fb->api("/$id/feed", "POST", Array(
                        'message' => $message,
                        'picture' => $picture,
                        'link' => $link,
                        'name' => "your app name",
                        'description' => $description
                    ));
            return "ok";
        } catch (FacebookApiException $e) {
            return false;
        }
    }

note : go through the sample code in sdk to find how to setup app, you can google and find lot of tutorials for that..
0
 

Author Closing Comment

by:rAfridi
ID: 34523494
good answer
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question