Code Monkey home page Code Monkey logo

Comments (9)

pc035860 avatar pc035860 commented on July 18, 2024

Deferred due to no immediate requirements.

from angular-easyfb.

wzr1337 avatar wzr1337 commented on July 18, 2024

I'd e interested in using the cordova plugin with easyfb for an app that I am working on.

I'll try to replace the remote with the local address first, maybe that is already all I need to do

from angular-easyfb.

pc035860 avatar pc035860 commented on July 18, 2024

Reopen time!

Gonna make some commits tomorrow.

from angular-easyfb.

pc035860 avatar pc035860 commented on July 18, 2024

Hi @wzr1337 ,

I just pushed some code to develop.
Here's an example: http://plnkr.co/edit/ynZkaB?p=preview

To work with the cordova facebook plugin example:

<!-- facebook js sdk -->
<script src="facebook-js-sdk.js"></script>
// angular config phase
.config(function ($FBProvider) {
  $FBProvider.setInitParams({
    appId: "{APP ID}", 
    nativeInterface: CDV.FB, 
    useCachedDialogs: false 
  });

  $FBProvider.setLoadSDKFunction(function ($document, $fbAsyncInit) {
    // No more async fb js sdk loading here, it's covered in the HTML

    $document.on('deviceready', function () {
      $fbAsyncInit();
    });
  });
})

If you feel confused about how $FBProvider.setLoadSDKFunction() works, check out the default function here:
https://github.com/pc035860/angular-easyfb/blob/develop/angular-easyfb.js#L65

I don't have any device to test for the cordova framework for now.
I'll try to test it next week. If you have it tried in your app, please let me know if it works.

from angular-easyfb.

wzr1337 avatar wzr1337 commented on July 18, 2024

Thanks,

I will try it out this evening.. I'll keep you posted

On Saturday, February 22, 2014, Robin Fan [email protected] wrote:

Hi @wzr1337 https://github.com/wzr1337 ,

I just pushed some code to develop.
Here's an example: http://plnkr.co/edit/ynZkaB?p=preview

To work with the cordova facebook plugin examplehttps://github.com/phonegap/phonegap-facebook-plugin/blob/master/example/Simple/index.html
:

<script src="facebook-js-sdk.js"></script>

// angular config phase.config(function ($FBProvider) {
$FBProvider.setInitParams({
appId: "{APP ID}",
nativeInterface: CDV.FB,
useCachedDialogs: false
});

$FBProvider.setLoadSDKFunction(function ($document, $fbAsyncInit) {
// No more async fb js sdk loading here, it's covered in the HTML

$document.on('deviceready', function () {
  $fbAsyncInit();
});

});})

If you feel confused about how $FBProvider.setLoadSDKFunction() works,
check out the default function here:

https://github.com/pc035860/angular-easyfb/blob/develop/angular-easyfb.js#L65

I don't have any device to test for the cordova framework for now.
I'll try to test it next week. If you have it tried in your app, please
let me know if it works.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-35798960
.

  • Patrick
    (mobile)

Register on http://zwoup.com for the next Generation Shopping List on your
smartphone.

from angular-easyfb.

wzr1337 avatar wzr1337 commented on July 18, 2024

I seem to have no luck here.

I set up a project, installed the plugin and added your plunkr files to the www folder. I can not say if $fbInitAsync() is being called successfully, because $FB.$$ready remains false.

If I then click on "login()", I get a blank screen an nothing more. The only output I get in the console is:

2014-02-22 21:38:07.482 HelloCordova[41724:70b] Resetting plugins due to page load.
2014-02-22 21:38:07.761 HelloCordova[41724:70b] Finished load of: https://m.facebook.com/dialog/oauth?app_id=352423428164607&client_id=352423428164607&display=touch&domain=&e2e=%7B%7D&locale=en_US&origin=2&redirect_uri=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D40%23cb%3Df85f70edc%26domain%3D%26origin%3Dfile%253A%252F%252F%252Ff23be2416c%26relation%3Dopener%26frame%3Dfca316da&response_type=token%2Csigned_request&scope=email%2Cuser_likes&sdk=joey

The URL being called looks pretty weird.. I assume I get back an error from facebook that is not displayed anywhere.. Do you know how I could debug the repsonse?

from angular-easyfb.

wzr1337 avatar wzr1337 commented on July 18, 2024

Got it running, your sample missed to include:

<!-- cordova -->
<script src="cordova.js"></script>
<!-- cordova facebook plugin -->
<script src="cdv-plugin-fb-connect.js"></script>

I posted the adapted sample here:

http://plnkr.co/edit/d19s0Gm0WeAki2pYKdgp

from angular-easyfb.

pc035860 avatar pc035860 commented on July 18, 2024

@wzr1337 Thanks a lot!

Sorry I didn't make it clear. I was actually hoping to test with the official simple example available at https://github.com/phonegap/phonegap-facebook-plugin/blob/master/example/Simple/index.html, whose initialization was via calling FB.init() in deviceready event handler.

Anyway, it'll be available in the next release since it works! Really appreciated!

from angular-easyfb.

scripta55 avatar scripta55 commented on July 18, 2024

does this still work? i see on issue 34 (#34) it became a problem after the rewrite...

from angular-easyfb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.