Skip to content

Commit

Permalink
Merge pull request #335 from crossroads/master
Browse files Browse the repository at this point in the history
LIVE => FB SDK Release
  • Loading branch information
abulsayyad123 authored Aug 20, 2020
2 parents 44e9827 + 7b624ae commit 7e60aaa
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
android_build_and_deploy:
<<: *defaults
docker:
- image: circleci/android:api-26-node8-alpha
- image: circleci/android:api-29-node@sha256:f57cbd442b1d90d01a672e87fa9c516a71312376641d70aee67736e78cb9645f
environment:
JVM_OPTS: -Xmx3200m
KEYSTORE: goodcity.keystore
Expand Down
19 changes: 0 additions & 19 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,6 @@
StatusBar.backgroundColorByName("black");
StatusBar.styleLightContent();
}

window.fbAsyncInit = function() {
FB.init({
appId : '315911462935779',
cookie : true,
xfbml : true,
version : 'v7.0'
});

FB.AppEvents.logPageView();

}; (function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

</script>

{{content-for 'head-footer'}}
Expand Down
29 changes: 29 additions & 0 deletions app/initializers/facebook_sdk_loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default {
name: "facebook_sdk_loader",
initialize: function() {
if (!window.hasOwnProperty("cordova")) {
window.fbAsyncInit = function() {
/* jshint ignore:start */
FB.init({
appId: "315911462935779",
cookie: true,
xfbml: true,
version: "v7.0"
});
FB.AppEvents.logPageView();
/* jshint ignore:end */
};
(function(d, s, id) {
var js,
fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
})(document, "script", "facebook-jssdk");
}
}
};
7 changes: 6 additions & 1 deletion cordova/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<preference name="LoadUrlTimeoutValue" value="120000"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="5000"/>
<preference name="android-minSdkVersion" value="22" />
<preference name="Orientation" value="portrait"/>
<icon src="res/android/drawable-ldpi/icon.png" density="ldpi"/>
<icon src="res/android/drawable-mdpi/icon.png" density="mdpi"/>
Expand Down Expand Up @@ -90,7 +91,7 @@
<allow-intent href="https://crossroads.uservoice.com/*"/>
<allow-intent href="https://checkout.paypal.com/*"/>
<engine name="ios" spec="~5.0.0" />
<engine name="android" spec="~8.0.0"/>
<engine name="android" spec="9.0.0"/>
<engine name="windows" spec="~4.3.1"/>
<plugin name="cordova-plugin-statusbar" spec="~2.1.1"/>
<plugin name="cordova-plugin-device" spec="~1.1.1"/>
Expand All @@ -108,4 +109,8 @@
<plugin name="cordova-plugin-globalization" spec="https://github.com/apache/cordova-plugin-globalization.git"/>
<plugin name="cordova-plugin-inappbrowser" spec="https://github.com/apache/cordova-plugin-inappbrowser.git"/>
<plugin name="cordova-plugin-dialogs" spec="https://github.com/apache/cordova-plugin-dialogs.git"/>
<plugin name="cordova-plugin-facebook4" spec="^6.4.0">
<variable name="APP_ID" value="315911462935779" />
<variable name="APP_NAME" value="goodcity" />
</plugin>
</widget>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goodcity",
"version": "0.18.0",
"version": "0.18.1",
"description": "Small description for goodcity goes here",
"license": "MIT",
"author": "",
Expand Down

0 comments on commit 7e60aaa

Please sign in to comment.