當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。