当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Facebook.api方法代码示例

本文整理汇总了TypeScript中ionic-native.Facebook.api方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Facebook.api方法的具体用法?TypeScript Facebook.api怎么用?TypeScript Facebook.api使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ionic-native.Facebook的用法示例。


在下文中一共展示了Facebook.api方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

 (response: FacebookLoginResponse) => {
   Facebook.api('/me?fields=email', ['email', 'public_profile']).then((response) => {
     console.log(response);
     self.dataProviderService.login(response).subscribe(res => {
       var user = res.json();
       self.login(user, user.isNew);
     });
   });
 },
开发者ID:just4developments,项目名称:notexpv2,代码行数:9,代码来源:login.page.ts

示例2: fbMe

  fbMe(response) {

    Facebook.api(
      "/me?fields=" + this.iframewin.apppfb.me_fields,
      null
    ).then( response => {
      this.fetchUser_Callback(response);
    });
  }
开发者ID:carminium,项目名称:newtechrev,代码行数:9,代码来源:facebook.ts

示例3: getFacebokInfo

 getFacebokInfo(userID) {
   //this.loginSuccess();
   Facebook.api(userID + "/?fields=id,email,birthday,picture,name,gender", ["public_profile", "email"]).then((result) => {
     this.global.member.id = userID;
     this.global.member.type = 'facebook';
     this.global.member.email = result.email;
     this.global.member.birthday = result.birthday;
     this.global.member.picture = 'http://graph.facebook.com/' + userID + '/picture?type=square';
     this.global.member.name = result.name;
     this.global.member.gender = result.gender;
     //this.test = 'result : ' + JSON.stringify(result);
     try {
       //let storage = new Storage(SqlStorage);
       this.global.storage.set('member', JSON.stringify(this.global.member)).then(() => {
         this.loginSuccess();
       });
     } catch (e) {
       alert(e.message);
     }
   }, function (error) {
     this.test = 'error : ' + error;
   })
 }
开发者ID:RemaxThailand,项目名称:RemaxMobile,代码行数:23,代码来源:login.ts

示例4: getProfile

  getProfile(){
    Facebook.api('/me?fields=id,name,picture',['public_profile']).then(
      (response)=> {
        this._dataservice.fbid=response.id;
        this._dataservice.username=response.name;
        this._dataservice.picture=response.picture.data.url;

        this.loading.dismiss();
        this.menu.enable(true);
        this.nav.setRoot(HomePage);
      },
      (err)=>{
        let alert = Alert.create({
          title : "Couldn't get your info",
          subTitle : "You can't continue right now, Try again later",
          buttons:['Will check it out']
        });
        this.loading.dismiss();
        this.nav.present(alert);
      }
    );

  }
开发者ID:ujjwal996,项目名称:campChatIonic,代码行数:23,代码来源:login.ts

示例5: getFriends

 static getFriends(user, successCallback) {
   Facebook.api('me/friends?access_token=' + user.token, []).then(response => {
     let friends = response.data;
     successCallback(friends);
   })
 }
开发者ID:ansodev,项目名称:AnsoMessage,代码行数:6,代码来源:facebook-login.ts

示例6:

 }).then((res)=> {
   return Facebook.api('/me?fields=first_name,last_name,birthday,gender,email,picture', [])
 })
开发者ID:hack4change,项目名称:hambasafe-client,代码行数:3,代码来源:auth.actions.ts

示例7: getUser

 getUser(user,successCallback){
   Facebook.api('me/photos?acess_token=' + user.token,[]).then( response => {
     let photo = response.data;
     successCallback(photo);
   })
 }
开发者ID:guihendias,项目名称:iniciacao-cientifica,代码行数:6,代码来源:UtilServices.ts


注:本文中的ionic-native.Facebook.api方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。