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


TypeScript ngx-facebook.FacebookService类代码示例

本文整理汇总了TypeScript中ngx-facebook.FacebookService的典型用法代码示例。如果您正苦于以下问题:TypeScript FacebookService类的具体用法?TypeScript FacebookService怎么用?TypeScript FacebookService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: constructor

  constructor(private fb: FacebookService, private accountService: AccountService) {
    let initParams: InitParams = {
      appId: '2012751978958165',
      xfbml: true,
      version: 'v2.8'
    };

    fb.init(initParams);
  }
开发者ID:eclaramunt,项目名称:socialcrawler,代码行数:9,代码来源:fb.service.ts

示例2: constructor

  constructor(private fb: FacebookService, private translate: TranslateService, private authorizationService: AuthorizationService, private router: Router) {

    console.log('Initializing Facebook');

    fb.init({
      appId: '229433700788344',
      version: 'v2.9'
    });

    translate.addLangs(['en', 'ru']);
    translate.setDefaultLang('en');

    const browserLang = translate.getBrowserLang();
    translate.use(browserLang.match(/en|ru/) ? browserLang : 'en');
  }
开发者ID:klymenko-ruslan,项目名称:cryptocurrency,代码行数:15,代码来源:app.component.ts

示例3: isLoggin

 isLoggin(): Promise<boolean> {
   return this.fb.getLoginStatus()
     .then((response: LoginStatus) => {
       return response.status === 'connected';
     })
     .catch(e => { return false; })
 }
开发者ID:eclaramunt,项目名称:socialcrawler,代码行数:7,代码来源:fb.service.ts

示例4: loginWithFacebook

  loginWithFacebook(): void {

    this.fb.login()
      .then((response: LoginResponse) => console.log(response))
      .catch((error: any) => console.error(error));

  }
开发者ID:klymenko-ruslan,项目名称:cryptocurrency,代码行数:7,代码来源:authorization.service.ts

示例5: InitService

    public InitService() {
        let initParams: InitParams = {
            appId: '447972592264310',
            xfbml: true,
            version: 'v2.10'
        };

        this.facebookService.init(initParams);
    }
开发者ID:OvidiuCaba,项目名称:StatisticsRomania,代码行数:9,代码来源:share.service.ts

示例6: addFacebook

 addFacebook(): void {
   this.fb.login({ scope: "user_posts", enable_profile_selector: true })
     .then((response: LoginResponse) => {
       //Obtenida la respuesta, aĂąado la cuenta al servidor
       this.accountService.addAccount({
         type: 'facebook',
         facebook_id: response.authResponse.userID
       })
     })
     .catch((error: any) => console.error(error));
 }
开发者ID:eclaramunt,项目名称:socialcrawler,代码行数:11,代码来源:fb.service.ts

示例7: faceshare

  faceshare(url: string) {

    let params: UIParams = {
      href: url,
      method: 'share'
    };

    this.fb.ui(params)
      .then((res: UIResponse) => console.log(res))
      .catch((e: any) => console.error(e));
  }
开发者ID:midanirachdi,项目名称:RC-Angular,代码行数:11,代码来源:eventsection.component.ts

示例8: attachments

 attachments(post_id) {
   let attachments = [];
   return this.fb.api(post_id + '/attachments').then(
     (res) => {
       if (res.data[0].media) {
         attachments.push(res.data[0].media.image.src);
       }
       else {
         if (res.data[0].subattachments) {
           res.data[0].subattachments.data.forEach((element) => {
             attachments.push(element.media.image.src);
           })
         }
       }
       return attachments;
     }
   ).catch(e => console.log(e));
 }
开发者ID:eclaramunt,项目名称:socialcrawler,代码行数:18,代码来源:fb.service.ts

示例9: me

 me() {
   return this.fb.api('me?fields=posts.limit(7)')
     .then(res => res.posts)
     .catch(e => console.log(e));
 }
开发者ID:eclaramunt,项目名称:socialcrawler,代码行数:5,代码来源:fb.service.ts


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