Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Android FacebookPlugin: Dialog does not work with params — Gideros Forum

Android FacebookPlugin: Dialog does not work with params

leduylinh87leduylinh87 Member
edited January 2016 in General questions
Hi everyone in Gideros Forum, I'm trying to implement Android FacebookPlugin, evething seem smooth, however, when i try to call these code:
facebook:dialog("feed", {
			app_id = "538366989673610",
			link = "<a href="http://giderosmobile.com"" rel="nofollow">http://giderosmobile.com"</a>, 
			picture = "<a href="http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png"" rel="nofollow">http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png"</a>, 
			name = "GiderosMobile.com", 
			caption = "Awesome tool", 
			description = "Check out this awesome product"
		})
The link show alright, however, every other params don't have any effect at all, just link params is effective.
As I've research a bit, WebDialog is deprecated. I've tried to change the GFacebook.java file like below, same thing happens
public static void dialog(final String action, final Object parameters){
		sActivity.get().runOnUiThread(new Runnable() {
 
			<a href="https://forum.gideros.rocks/profile/Override" rel="nofollow">@Override</a>
			public void run() {
				 if (sfb.isLogin())
	             {
					 /*WebDialog dialog = (
				        new WebDialog.FeedDialogBuilder(sActivity.get(),
				            Session.getActiveSession(), (Bundle)parameters))
				            .setOnCompleteListener(new WebDialogCallback(action))
				            .build();
					 Window dialogWindow = dialog.getWindow();
					 dialogWindow.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
					 dialog.show();*/
 
					 Bundle params = new Bundle();
					 params.putString("name", "XXX");
					 params.putString("caption", "YYY");
					 params.putString("description", "ZZZ");
					 params.putString("picture", "<a href="https://i.ytimg.com/vi/0nrr3VE4-Ww/maxresdefault.jpg&quot" rel="nofollow">https://i.ytimg.com/vi/0nrr3VE4-Ww/maxresdefault.jpg&quot</a><img class="emoji" src="https://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />;
 
					 WebDialog dialog = (
							 new WebDialog.FeedDialogBuilder(sActivity.get(),
									 Session.getActiveSession(), params))
							 .setOnCompleteListener(new WebDialogCallback(action))
							 .build();
					 Window dialogWindow = dialog.getWindow();
					 dialogWindow.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
					 dialog.show();
				 }
			}
		});
	}

Comments

  • piepie Member
    @leduylinh87 which release of gideros are you using?
    I can tell that almost the same code you used here works for me on 2015.09

    The only difference is in how I wrote parameters:
    local params =  {
    			app_id = "538366989673610",
    			name = "GiderosMobile.com", 
    			caption = "Awesome tool", 
    			description = "Check out this awesome product",
    			link = "<a href="http://giderosmobile.com" rel="nofollow">http://giderosmobile.com</a> ", 
    			picture = "<a href="http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png" rel="nofollow">http://www.giderosmobile.com/wp-content/uploads/2012/06/gideros-mobile-small.png</a> "
    		}
    facebook:dialog("feed", params)
  • leduylinh87leduylinh87 Member
    edited January 2016
    I'm using the newest version of gideros, and plugin version in All Plugins folder

    Here is my feed's post
    Untitled.png
    501 x 250 - 42K
  • Can anyone help me on this issue? :( Deadline is approaching fast :(
  • are you using newer Facebook SDK?
    Cause I remember they want to prevent everyone using preentered text.
    So it might be possible with older version through WebDialog and most probably it won't be possible in newer versions anymore
  • leduylinh87leduylinh87 Member
    edited January 2016
    @ar2rsawseen I'm currently using facebook SDK 3.14 which came along with the gideros studio installation.Don't know if it's relevent or not but I'm using only facebook module in the SDK.

    First time implement facebook SDK, I use the oldest version in the jcenter (3.19). After failure in using WebDialog, I suspect the same thing, and try to use the module version in Gideros installation (3.14). However, problem is not resolved.
Sign In or Register to comment.