-
Notifications
You must be signed in to change notification settings - Fork 957
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(social): add social facebook pages manager
- Loading branch information
1 parent
9a9f94d
commit 2537d3f
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
android/src/main/java/cl/json/social/FacebookPagesManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package cl.json.social; | ||
|
||
import android.content.ActivityNotFoundException; | ||
|
||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.bridge.ReadableMap; | ||
|
||
/** | ||
* Created by disenodosbbcl on 23-07-16. | ||
*/ | ||
public class FacebookPagesManagerShare extends SingleShareIntent { | ||
|
||
private static final String PACKAGE = "com.facebook.pages.app"; | ||
private static final String DEFAULT_WEB_LINK = "https://www.facebook.com/sharer/sharer.php?u={url}"; | ||
|
||
public FacebookPagesManagerShare(ReactApplicationContext reactContext) { | ||
super(reactContext); | ||
} | ||
@Override | ||
public void open(ReadableMap options) throws ActivityNotFoundException { | ||
super.open(options); | ||
// MORE DATA | ||
this.openIntentChooser(); | ||
} | ||
@Override | ||
protected String getPackage() { | ||
return PACKAGE; | ||
} | ||
|
||
@Override | ||
protected String getDefaultWebLink() { | ||
return DEFAULT_WEB_LINK; | ||
} | ||
|
||
@Override | ||
protected String getPlayStoreLink() { | ||
return null; | ||
} | ||
} |