Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Native ads in recycler view android

I am wondering if anyone has tried to integrate facebook audience network native ads in recycler view ??

Is there any simple solution like mopub recycler view adapter https://github.com/mopub/mopub-android-sdk/wiki/Native-Ads-with-Recycler-View for facebook audience network native ads ??

like image 583
Pranay Airan Avatar asked Nov 25 '15 04:11

Pranay Airan


1 Answers

I create a lib for loading Facebook Native Ad in Adapter.

https://github.com/ldt116/FBNativeAdAdapter

You can check the example

MyAdapter adapter = new MyAdapter();
FBNativeAdAdapter fbAdapter = FBNativeAdAdapter.Builder.with(PLACEHOLDER_ID, adapter).build();

RecyclerView rv = (RecyclerView) findViewById(R.id.rv);
rv.setAdapter(fbAdapter);
rv.setLayoutManager(new LinearLayoutManager(this));

Any idea or comments are welcome

like image 52
thuanle Avatar answered Oct 10 '22 21:10

thuanle