내 반응 네이티브 앱에 트위터에 트위터를 올리거나 공유하려고합니다. 그러나 작업 라이브러리/프레임 워크를 찾을 수 없습니다. 나에게 완벽한 도서관을 제안 해주세요. 미리 감사드립니다.반응 네이티브를 사용하는 트위터에 게시/공유
0
A
답변
0
기존의 트윗을 공유하려고합니까, 아니면 Twitter의 앱에서 일부 콘텐츠를 공유하려고합니까? 후자 인 경우 https://facebook.github.io/react-native/docs/share.html을 살펴볼 수 있습니다.
0
//cancel method
onCancel() {
console.log("CANCEL")
this.setState({visible:false});
}
//in render method
{
let shareOptions = {
title: "your app name",
message: "Sharing Test",
url: which url you want share,
subject: "Share" // for email
};
// in retrun
<TouchableOpacity activeOpacity={.5} onPress={()=>{
this.onCancel();
setTimeout(() => {
Share.shareSingle(Object.assign(shareOptions, {
"social": "twitter"
}));
},300);}}>
<Image source={require('../images/twitter.png')} style={{resizeMode:"stretch",height:35,width:35,marginLeft:15}}/>
</TouchableOpacity>