android


Facebook Share dialog not showing the Description


I am unable to find the problem in this code.
I am trying to do Facebook Integration where login is successful but problem comes at sharing time. During share, the dialog box must take the mentioned text and the values of 4 textViews.
Source Code :
pop.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener()
{
#Override
public boolean onMenuItemClick(MenuItem item) {
//Facebook Share
if(item.getItemId()== R.id.facebook) {
{
ShareDialog shareDialog = new ShareDialog(MainActivity.this);
if (ShareDialog.canShow(ShareLinkContent.class)) {
ShareLinkContent content = new ShareLinkContent.Builder(). setContentTitle("Test").
setContentUrl(Uri.parse("http://developers.facebook.com/android")).
setContentDescription(teamA.getText()+ scoreTeamA.getText()+ teamB.getText() + scoreTeamB.getText()).build();
shareDialog.show(content);
}
}
}
From the Share Pop-up Menu, when I click on Facebook it shows the URL context but doesn't show the values of 2-Text Edits and 2-textViews.
Snippet:
Try using: teamA.getText().toString() in setContentDescription()
setContentDescription(teamA.getText().toString()+ scoreTeamA.getText().toString()+
teamB.getText().toString() + scoreTeamB.getText().toString())
Well, when you set Content URL, then facebook doesn't use any images and text or description you set, it actually scrap all the information from that URL and use that instead .. That's why it's happening ..

Related Links

Android App crashes when installed from website/Google Drive
Vertical Texview
Why it doesn't crash when invoking a nonexistent api
Event handler for close/force stop an ionic app
Which service will be returned using AIDL, if multiple apps contain the same Service class as an external dependency
getArguments().getInt() starts returning from “1”, instead “0”
Android Studio : E/SQLiteLog: (1) table places has no column named description_place
Finding user location
Sectioned RecyclerView with different layouts
If your app is laggy on an android emulator, does that mean it will be laggy on a real device?
What is the best practice to optimize CPU utilization in android?
JNI works well only when the JAVA apk runs by “Run As-Android Application” on Eclips
android:configChanges=“orientation|screenSize” changes my layout look
How to communicate from Mainactivity to Fragment using callback interface?
Adding table data before creating SQLite database
How to draw Line with rounded corners in Android xml drawables

Categories

HOME
google-cloud-platform
hyperlink
telegram
webdriver
alexa-skills-kit
formal-languages
saml-2.0
edge
nsbundle
mips
interpolation
android-json
google-admin-sdk
google-cloud-datalab
jax-ws
performancepoint
little-proxy
plist
libusb
entitymanager
android-7.0-nougat
template-engine
charles
database-connection
visual-studio-extensions
joptionpane
mongoid6
interbase
gpio
android-sharedpreferences
angularjs-components
android-maps
entity-relationship-model
firebase-analytics
soot
panoramas
cognos-bi
angularjs-material
card.io
instantiation
modalviewcontroller
salesforce-communities
release
z-notation
protein-database
bc
comparison-operators
ogc
stringtokenizer
datacachefactory
linqpad
contract
rfc3339
jboss-4.2.x
serde
spring-integration-sftp
facebook-pixel
azure-cli
spring-data-couchbase
pdf-conversion
javafx-css
materialized-path-pattern
docpad
meteor-packages
redbeard-ios
qtplugin
dup
qiime
gcloud-ruby
uiactionsheet
grgit
gocql
avisynth
vigenere
poppler
airbrake
linked-tables
nsurlsessiondatatask
node-serialport
j-security-check
dot.js
rickshaw
rmysql
nsmenu
ora-00904
matrix-inverse
renderer
model-driven-development
sentestingkit
role
workflow-services
pylucene
cgbitmapcontextcreate
aspmenu
nstokenfield
burndowncharts
fail-fast-fail-early
fdf

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App