Facebook wall post from multiple pages

I have been trying to make wall post from multiple pages but when i try to make post from other pages except original facebook page, it is giving me an exception of java.lang.NullPointerException

The method i am calling and created in a Facebook page

public void postOnWall(String msg) {
        Log.d("Tests", "Testing graph API wall post");
         try {
                String response = mFacebook.request("me");
                Bundle parameters = new Bundle();
                parameters.putString("message", msg);
                parameters.putString("description", "test test test");
                response = mFacebook.request("me/feed", parameters, 
                Log.d("Tests", "got response: " + response);
                if (response == null || response.equals("") || 
                        response.equals("false")) {
                   Log.v("Error", "Blank response");
         } catch(Exception e) {

and code to call this method.

try {

                    mFacebookObj.postOnWall("Add poi");

                } catch(Exception e){

both are activity classes.

Now can anyone tell me how shall i call this method from outside this page and make post over facebook wall


The answer is, to make wall post from from multiple pages, just restore values of access_token and token_expire value in faceook object.. and then use mFacebook.request(...); That works as Facebook object needs to have access token and access token expire value provided by facebook itself in response given at the time of login with facebook

Need Your Help

specialize a member template without specializing its parent

c++ templates partial-specialization

I have a class template nested inside another template. Partially specializing it is easy: I just declare another template< … > block inside its parent.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.