facebook.stream.addlike没有在silverlight应用程序中工作。 [英] facebook.stream.addlike not working in silverlight application.

查看:57
本文介绍了facebook.stream.addlike没有在silverlight应用程序中工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Silverlight中使用facebook sdk构建一个应用程序。在我的应用程序中,我需要发送"like"对于帖子,要实现这一点,请使用以下异步调用"_fb.Stream.AddLikeAsync(_dataAccess.Session.UserId,feed.stream_post.post_id,OnLikeCompleted,
null);"这是一个例外说法"{Facebook.Utility.FacebookException:当使用会话密钥签署请求时必须指定会话密钥

    at Facebook.Utility.Utilities.ParseException(String response,Boolean JSONFormat)

    at Facebook.Rest.RestBase.OnRequestCompleted(Object sender,RequestCompletedEventArgs e)}"

Am trying to build an application using facebook sdk in silverlight. In my application I need to send "like" for a post, to achieve this am using the following Async call "_fb.Stream.AddLikeAsync(_dataAccess.Session.UserId, feed.stream_post.post_id, OnLikeCompleted, null);" which is giving an exception saying"{Facebook.Utility.FacebookException: A session key must be specified when request is signed with a session secret
   at Facebook.Utility.Utilities.ParseException(String response, Boolean JSONFormat)
   at Facebook.Rest.RestBase.OnRequestCompleted(Object sender, RequestCompletedEventArgs e)}"

 private void lnkLike_Click(object sender, RoutedEventArgs e)
        {
            var feed = (sender as FrameworkElement).DataContext as StreamStory;
            
            MessageBox.Show(feed.stream_post.post_id.ToString());
            _fb.Stream.AddLikeAsync(_dataAccess.Session.UserId, feed.stream_post.post_id, OnLikeCompleted, null);
           
        }
        private void OnLikeCompleted(bool result, Object state, FacebookException e)
        {
            if (e == null)
            {
                Dispatcher.BeginInvoke(() => MessageBox.Show("likes success")); 
                var actual = result;
            }
            else
            {
                 Dispatcher.BeginInvoke(() =>MessageBox.Show("Error: " +e.Message));
            }
        }

任何人都可以帮我解决上述问题。在此先感谢。

anyone please help me out to resolve the above issue. Thanks in advance.

推荐答案

您好

尝试一个Silverlight论坛...这个为html,css和scripting ...

try a silverlight forum... this ones for html, css and scripting...

FB like按钮在网页的head部分使用og meta标签将参数值传递给FB,如确认页面。除非在触发按钮单击事件处理程序
之前更改og值,否则在同一网页上不能有多个Like按钮。 FB需要更改其api以接受参数值i / o读取og元数据。

FB like buttons use og meta tags in the head section of web pages to pass parameter values to the FB like confirmation page. You cannot have multiple Like buttons on the same web page unless you change the og values before the button click event handler is fired. FB need to change their api's to accept parameter values i/o reading the og meta data.

问候。


这篇关于facebook.stream.addlike没有在silverlight应用程序中工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆