Software Archive
Read-only legacy content
17061 Discussions

well Facebook is not listed in web services ... why? I want use Facebook Auth is any tutorial for this using sample app above...

Leonidas_S_
New Contributor I
2,260 Views

I have a look at:

https://software.intel.com/en-us/xdk/docs/templates-to-get-started-with-xdk-app-development

Login app

well Facebook is not listed in web services ... why? I want use Facebook Auth is any tutorial for this using sample app above...?

 

 

0 Kudos
13 Replies
Leonidas_S_
New Contributor I
2,260 Views


May use login app with jQm for other pages after login... ?
Also login app - first thread url - may implemented with backend custom PHP code(or any lang backend?) or alternatively may link Facebook, Twitter or Google logins...? You have tutorial for the latter? Or tutorial For the first php custom way?

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

you have any help resource tutorial about how to:

  1. link xdk login app to custom PHP
  2. for Facebook Login API Cordova Apache and XDK/Cordova have little differences?

?

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

https://github.com/gomobile/template-login-view

here after submit Register or Login where go data to compare with server side PHP/MySQL... DATA ON SERVER ???

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

OK, I HAVE FOUND WHERE PHP CODE FITS ... Well in secure code can apply and jQm code? Also for a Cordova app [this secure can be and also for html5 only - Not cordova?] all pages[even pure jQm pages external] linked from #main below expect login / register are secure - if not linked from elsewhere??? User name after login normally saved in localStorage or...?

            <!-- Main App View -->
            <div class="panel" data-title="Start" id="main">
                <p>This is App page after user has signed in...</p>
            </div>

 

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

Also,...

I added Plugin Cordova - see attachment shot - to Sample XDK Login App... what follows, where are Facebook files? Can proceed add to index.html code like:   // or needed add web service - i do Not see Facebook in Web services...?

var fbLoginSuccess = function (userData) {
    alert("UserInfo: " + JSON.stringify(userData));
    facebookConnectPlugin.getAccessToken(function(token) {
        alert("Token: " + token);
    }, function(err) {
        alert("Could not get access token: " + err);
    });
}

facebookConnectPlugin.login(["public_profile"],
    fbLoginSuccess,
    function (error) { alert("" + error) }
);

For Android sample app remember to configure the project with your FB app id in the res/values/facebookconnect.xmlfile. For example:

I DO NOT FOUND THIS TO SAMPLE APPFRAMEWORK LOGIN APP XDK... WHAT TO DO?

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

Also I reviewed Templates again and found Login View App ONLY html5,... and Not html5+cordova.... can convert to cordova?

reply and past threads... 

thanks for prompt help

 

0 Kudos
Barry_Johnson
New Contributor I
2,260 Views

Regarding your screen shot in the post beginning "Also..."

You do not appear to be running the current version of the XDK. There are substantial changes in how plugins are handled in the newest vs previous versions of the XDK. I am not saying that switching to the new version will solve you problems - in fact it may increase them - however, most people's attention on these forums have shifted to the newer version and you may get better assistance.

I do agree however with Gabrielle's comment that it is very difficult to understand what help you asking for.

Some general remarks: the tutorial/template app you are referencing in message one is just the UI. If you look at the source code, it has comments like "server calls go here" - that is where you would call off to the server.

What those server calls would look like would differ whether the backend service is you custom (PHP I guess) app, Twitter, Facebook, etc. For example, with Twitter you would need to do an OAuth login via the web (I do this using the InAppBrowser plugin). While it is technically possible to do a web-based login to facebook, they will no longer approve those to my knowledge - you must do the login via Cordova plugin, which in turn makes use of Facebook's native SDK.

0 Kudos
Amrita_C_Intel
Employee
2,260 Views

Hello,

You can also refer this particular article for Facebook Login.

https://software.intel.com/en-us/xdk/article/facebook-connect-plugin-android-ios

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

 

Also I reviewed Sample Templates again and found Login View App is ONLY html5,... and Not html5+cordova.... can convert to cordova?

If yes, I should create a BLACK HTML5+CORDOVA App and paste code in from Login View App... this is one way?

reply: Yes, that should work   ///   No, it shouldn't work

0 Kudos
Leonidas_S_
New Contributor I
2,260 Views

how for facebook in XDK get:

  1. Development Key Hashes
  2. Release Key Hash

and what is in XDK:

  • Default Activity Class Name

if my package name is org.pc.mycar

???

0 Kudos
Amrita_C_Intel
Employee
2,260 Views

Hello,

The login view sample which I pointed is build with  HTML + Cordova. HAve you tried to follow steps in article?  You need to follow some steps inorder to copy paste the code. I can guide you if you are facing any issues.Yes please create a blank project  HTML + Cordova and follow those instructions which are in that Article.

0 Kudos
Barry_Johnson
New Contributor I
2,260 Views

@Leonidas-

re: your question about key hashes.

This works great: https://software.intel.com/en-us/xdk/articles/facebook-android-keyhash

re: activity name - you can use APKTool to extract the AndroidManifest.xml. It appears the activity name is derived from the name of your XDK project, although I see that it converts hyphens to underscores - my project is named "foo-bar" but the activity name which shows in the manifest is "foo_bar" (it is not really foo-bar, but it is illustrative).

0 Kudos
Anusha_M_Intel1
Employee
2,260 Views

Leonidas S. wrote:

 

Also I reviewed Sample Templates again and found Login View App is ONLY html5,... and Not html5+cordova.... can convert to cordova?

If yes, I should create a BLACK HTML5+CORDOVA App and paste code in from Login View App... this is one way?

reply: Yes, that should work   ///   No, it shouldn't work

You can by all means copy paste. Or you can create the login view app as it is and convert it to Cordova by using the little Cordova icon on the Projects tab. Projects Tab -> Project info -> Upgrade -> Click on Cordova icon. Good to go! You can start adding plugins and your project type and settings changed to HTML5 + Cordova app. 

 

0 Kudos
Reply