Skip to content

Instantly share code, notes, and snippets.

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{your-app-id}</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
// AppDelegate.m
#import <FBSDKCoreKit/FBSDKCoreKit.h>
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// You can skip this line if you have the latest version of the SDK installed
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
// Add any custom logic here.
module.exports = {
project: {
ios: {},
android: {}, // grouped into "project"
},
assets: ["./assets/fonts/"], // stays the same
};
import React, {Component} from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import {
AccessToken,
GraphRequest,
GraphRequestManager,
LoginManager,
} from 'react-native-fbsdk';
export default class App extends Component {
import React, {Component} from 'react';
import {View, Text} from 'react-native';
import {
LoginButton,
AccessToken,
GraphRequest,
GraphRequestManager,
} from 'react-native-fbsdk';
export default class App extends Component {
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Image
style={{width: 300,height:200,backgroundColor:"red"}}
source={{
uri:
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR20x8bJ3J8WSIvzlm_uJKYZqSNAft5uXPRkWcd5pWb2I7N2Lpw"
}}
resizeMode="center"
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Image
style={{width: 300,height:200,backgroundColor:"red"}}
source={{
uri:
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR20x8bJ3J8WSIvzlm_uJKYZqSNAft5uXPRkWcd5pWb2I7N2Lpw"
}}
resizeMode="repeat"
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Image
style={{width: 300,height:200,backgroundColor:"red"}}
source={{
uri:
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Square_dance_sign.svg/1200px-Square_dance_sign.svg.png"
}}
resizeMode="stretch"
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Image
style={{width: 300,height:200,backgroundColor:"red"}}
source={{
uri:
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Square_dance_sign.svg/1200px-Square_dance_sign.svg.png"
}}
resizeMode="contain"
render() {
return (
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
<Image
style={{width: 300,height:200,backgroundColor:"red"}}
source={{
uri:
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Square_dance_sign.svg/1200px-Square_dance_sign.svg.png"
}}
resizeMode="cover"