简体   繁体   English

Ionic2社交分享Facebook无法正常工作

[英]Ionic2 Social Sharing Facebook not working

So the problem is that the specified message is not in the facebook modal sharing window, it's empty doesn't have any text. 因此,问题在于指定的message不在Facebook模式共享窗口中,它为空,没有任何文本。

  import {SocialSharing} from 'ionic-native';
  ...
  shareFb(message?: string){
    SocialSharing.shareViaFacebook(message,null,null).then(()=>{
        //Success
      },
      ()=>{
        //cancel      
      });
    }


<ion-icon name="logo-facebook" 
 class="share-facebook" (click)="shareFb(message.description)">
 </ion-icon>  <ion-icon ios="logo-twitter" md="logo-twitter"></ion-icon>

I have also struggled with this finally to find out - Sharing a message on Facebook is not possible (as of today). 我也为此付出了艰辛的努力,以找出答案-截至今天为止, 无法在Facebook上分享消息

It is mentioned in the SocialSharing plugin documentation at this part . 在此部分SocialSharing插件文档中已提到该SocialSharing

This is an issue with the facebook API. 是facebook API的问题。 Here they have mentioned: 他们在这里提到:

This issue is going to be closed by design because our API does not support pre-filling the message for users as seen in our Policy Documentation here 此问题将通过设计解决,因为我们的API不支持为用户预填充消息,如此处的政策文档中所示

Basically, to sum up, it is not in there policy to allow this. 概括地说,基本上没有政策允许这样做。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM