Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Blackberry webworks 如何访问BB10中的FB共享?_Blackberry Webworks - Fatal编程技术网

Blackberry webworks 如何访问BB10中的FB共享?

Blackberry webworks 如何访问BB10中的FB共享?,blackberry-webworks,Blackberry Webworks,我曾尝试在facebook上分享,但无法分享任何东西。 我使用的代码是:- 在Javascript中 FB.init({ appId: 'some id', cookie: true, status:true, xfbml:true, oauth:true }); function postToFeed() { // calling

我曾尝试在facebook上分享,但无法分享任何东西。 我使用的代码是:-

在Javascript中

FB.init({
         appId: 'some id', 
         cookie: true,
            status:true, 
            xfbml:true,
            oauth:true
         });


      function postToFeed() {

        // calling the API ...
        var obj = {
          method: 'feed',
          link: 'http://www.example.com',
          picture: imageToShare,
          name: 'name',
          caption: 'This Link is Shared through the some application.',
          description: ''

        };

        function callback(response) {
          //document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
        }

        FB.ui(obj, callback);
      }
在配置文件中

<access uri="http://connect.facebook.net" />


提前感谢。

如果你只想在Facebook上分享你的应用程序中的内容,你可以很容易地用卡片来实现

我在这里写了一篇博文:

基本上,您使用BlackBerry调用框架来调用该卡,并将一些数据传递给该卡

function invokeFacebook() {
    blackberry.invoke.invoke({
        target: "Facebook",
        action: "bb.action.SHARE",
        type: "text/plain",
        data: "I’m eating tacos with Alex."
    }, onSuccess, onError);
}
如果要共享图像,只需将“数据”属性替换为:

uri: 'file://' + pathToFile,

我们的GitHub repo上还有一个示例应用程序:

嗨,chadtatro,我收到一个错误“调用错误:调用\u无\u目标\u错误”你能帮我吗?谢谢