swatiswati / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

feed_publishTemplatizedAction() returns "true" but not posting on my fanspage. #364

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Given offline_access permission.
2. Add params to TemplatizedAction object.
3. Use feed_publishTemplatizedAction(action) method

What is the expected output? What do you see instead?
I need to publish a story on my FansPage. But after execution, it return true 
but not posted on my fansPage.

What version of the product are you using? On what operating system?
facebook-java-api-3.0.2.jar on Widows XP

Please provide any additional information below.

userClient = new FacebookXmlRestClient(api_key, secret);
if(userClient.users_hasAppPermission(Permission.OFFLINE_ACCESS, longFacebookUser
ID)){
        TemplatizedAction action = new TemplatizedAction("{actor} recommends {book}");                     
    action.setPageActorId(ctProfileId);//fansPageId
        action.addTitleParam("book", "<a href='http://www.amazon.com/Hamlet/dp/0140714545/'>Hamlet</a>");   
        action.setBodyTemplate("{actor} is using BooksApp!");                                               
        action.setBodyGeneral("100 other people recommend this book!");                                     
        action.addPicture("http://code.google.com/hosting/images/code_sm.png", "http://www.google.com");    
        action.addPicture("http://code.google.com/hosting/images/code_sm.png", "http://www.google.com");
        action.addPicture("http://code.google.com/hosting/images/code_sm.png", "http://www.google.com");
        action.addPicture("http://code.google.com/hosting/images/code_sm.png", "http://www.google.com");
        userClient.feed_PublishTemplatizedAction(action);
}

Original issue reported on code.google.com by jerryjo...@gmail.com on 13 Aug 2012 at 6:36