Eu normalmente resolvo disparando um Intent. Nesse caso, eu monto o URI com o facebookID do cara, e faço a checagem se o app do FB está instalado ou não.
// Intents.java
public static final Intent toFacebookWithApp(String facebookID) { return new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/".concat(facebookID))); } public static final Intent toFacebookWithBrowser(String facebookID) { return new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/".concat(facebookID))); }
// Usando
try { startActivity(Intents.toFacebookWithApp(fbid)); } catch (Exception e) { startActivity(Intents.toFacebookWithBrowser(fbid)); }
Espero ter ajudado ;)
[]s
----------------------------------------------------------
Ubiratan Soares
Ubiratan Soares
(11) 98565 8455
On Sun, Dec 8, 2013 at 11:34 AM, Guilherme Ferreira <guilffer@gmail.com> wrote:
Olá, Pessoal!--Estou desenvolvendo um app que tem uma base de dados com vários links para paginas do facebook (ex: http://facebook.com/perfil.pagina).Existe alguma forma de abrir a pagina ou perfil direto no app do facebook?
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






0 comentários:
Postar um comentário