FacebookService.PublishStory is depricated

Dec 16, 2009 at 4:10 PM


I am trying to create facebook application. 

I went trough autorization and able to create a facebook session. But then, when I try to post something I have exception - This method is deprecated

Both PublishAction and PublishStory fails

_fbService.PublishAction("test", "body with <b>html tags</b>", null);

I saw recomendation to use publishUserAction method, but I cannot find it in API. 

It seems that main solutions are

- hack Facebook.net to use newer methods;

- get updated api (but I downloaded it yesterday)

- Maybe I did not set some switch in application configuration? 

Thanks for help

Dec 22, 2009 at 3:45 AM

if you're trying to publish to a user's stream.. i suggest you use the Javscript API.

here's an example of what i did:

under the <body> tag

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js" type="text/javascript"></script>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
            FB.init("XXXXXXXXXXXXXXXXXXXXXX API KEY", "xd_receiver.htm");



then somewhere inside the body:

<script type="text/javascript">
        function callPublish(msg, attachment, action_link) {
            FB.ensureInit(function() {
                FB.Connect.streamPublish('', attachment, action_link);

<asp:Button ID="Button2" runat="server" Text="Share website.com" BorderStyle="None"
                 OnClientClick="callPublish('',{'name':'website.com on facebook','href':'http://apps.facebook.com/XXXXXXX/','description':'blah blah blah'},[{'text':'Official blah's Website','href':'http://xxxxxx.com'}]);return false;" BackColor="#7A829F" ForeColor="White" PostBackUrl="#"
                EnableTheming="True" />


Jan 13, 2010 at 5:10 AM

Hi chengbang69, what type of application did you use that code in? I've been busting my skull trying to get this (and other variations) to work inside my IFrame-based app.


Jan 13, 2010 at 5:11 AM

BTW, there is a very handy code generator for this method here... http://developers.facebook.com/tools.php?connect_wizard&wizard=stream_publish