Created
August 12, 2022 12:21
-
-
Save dmitriy-chernysh/90575f79071a839e1cf97de1492424f1 to your computer and use it in GitHub Desktop.
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
val accessToken : AccessToken = | |
AccessToken( | |
// String token you saved from Pages list | |
token, | |
// replace it by your applicationId | |
"com.app.packagename", | |
// ID you saved from Pages list | |
pageId, | |
// The same permissions list we used for Login flow at point 4 | |
listOf("public_profile", "pages_manage_posts"), | |
null, | |
null, | |
AccessToken.getCurrentAccessToken()?.source, | |
AccessToken.getCurrentAccessToken()?.expires, | |
AccessToken.getCurrentAccessToken()?.lastRefresh, | |
null | |
) | |
} | |
} | |
AccessToken.setCurrentAccessToken(accessToken) | |
val shareBuilder = ShareVideo.Builder() | |
.setLocalUrl(localVideoFile.toUri()) | |
val videoContentBuilder = ShareVideoContent.Builder() | |
.setContentDescription("Post desctiption here") | |
.setContentTitle("Post title here") | |
.setVideo(shareBuilder.build()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment