https://www.drupal.org/sandbox/chriscollins405/2836169
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/chriscollins405/2836169.git instagram_scrape_feed
cd instagram_scrape_feed
This is my third module. I have been through this process before, but as my last module didnt quite have enough lines in it, I was able to make it a full project, but not have the permission to add my own full projects.
https://www.drupal.org/project/zurb_responsive_tables
https://www.drupal.org/sandbox/chriscollins405/2747947
Instagram Scrape Feed provides an Instagram feed in a block that does not require authentication, access tokens or API keys. It simply scrapes a public Instagram profile and returns up to 12 posts.
Why?
We build loads of sites, and getting an Instagram feed set up is always a pain. You have to get access tokens, or API keys, and get the clients login details so you can do this. We built this module to create a really easy and simple way to display a feed in a block.
How does it work?
The module will scrape a public Instagram profile page, and find the 12 latest posts. It will return the standard square image, "like" count, "comment" count and the post caption. We got the basic idea from https://gist.github.com/cosmocatalano/4544576 and went our own way with it.
Configuration
You can control the username, number of posts to display, number of columns to show, and trim the caption length.
How to use (Very Easy)
Simply...
- Place the module in your sites directory and enable as normal.
- Configure the block in Structure > Blocks.
- Enter the Instagram username you wish to display.
- Configure the number of posts and number of columns to fit your theme and style.
- Done! :-)
Whats the catch?
This module makes no attempt to store the Instagram post data, and does not integrate with Entity API. If you need that functionality, check out the other options out there. This is just a dirty, quick, easy alternative for people who want to get a feed up and running in a few clicks.
The Instagram profile you want to scrape must be set as public.
Screenshots
Comments
Comment #2
PA robot CreditAttribution: PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
Collins405 CreditAttribution: Collins405 commentedComment #4
Collins405 CreditAttribution: Collins405 commentedComment #5
visabhishek CreditAttribution: visabhishek as a volunteer and at Azri Solutions commentedComment #6
visabhishek CreditAttribution: visabhishek as a volunteer and at Azri Solutions commentedAutomated Review
Please fix the issue reported on https://pareview.sh/node/434
Manual Review
Example Code :
Example
<a>
tag and theme() instead of writing html tags.Example Code :
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #7
sandip27 CreditAttribution: sandip27 at Cybage Software Pvt Ltd. commentedHello Collins405,
I have had reviewed few files off of module and below are my findings. Please take care of those.
1. In File, instagram_scrape.install, should have "@file" in doc comments.
2. Remove the white spaces off of file at end of file.
3. Maintain no. of characters in each line.
4. In File, instagram_scrape.module, file doc comments are missing.
5. In the same file, function doc comments seems are also missing. Please take care of it.
6. Use "/**" for function comments
There are a lots spacing and lines issues, please take care of those.
Thanks
Comment #8
Collins405 CreditAttribution: Collins405 commentedHi sandip27 and visabhishek,
Thank you for taking the time to review this module.
I have fixed the following problems...
visabhishek, you mentioned using l() instead of
<a>
, but I cant find a good example of doing this with an image as the anchor content.Is this correct?
l('<img src="' . $imgurl . '" alt="' . $caption . '" />', $posturl, array('attributes' => array('target' => '_blank')));
I have tried the above, but as l() only accepts text, and uses
check_plain
, as I pass an<img>
into it, it returns it as plain text which doesnt work.Comment #9
Collins405 CreditAttribution: Collins405 commentedComment #10
Collins405 CreditAttribution: Collins405 commentedAs mentioned above, I have decided to ignore the suggestion to use l() instead of
<a>
, due to the way the Instagram image needs to be formatted.Module is now ready for review again.
Comment #11
Collins405 CreditAttribution: Collins405 commentedI'd love someone to RBTC this project if they have the time! Thanks.
Comment #12
jeetendrakumar CreditAttribution: jeetendrakumar as a volunteer and at HyTechPro.com commented@Collins405
Please use following code instead of
<a>
$block['content']['#markup'] .= l('<img src="' . $imgurl . '" alt="' . $caption . '" />', $posturl, array('attributes' => array('target' => '_blank'), 'html' => true));
Comment #13
VoidE CreditAttribution: VoidE commentedI noticed you forgot some spaces after colons in your css files. (Lines 9, 96, 97, 98, 114)
For Example:
Also I'm wondering why you defined the function `scrape_insta` inside the function `instagram_scrape_block_view`. I don't know if it's wrong, but I'm used to define functions all on the same level. Just wondering.
Comment #14
VoidE CreditAttribution: VoidE commentedComment #15
kumar_kundan CreditAttribution: kumar_kundan at Azri Solutions commentedI have used this module. It is working fine for me. Code/readme all looks good to me.
+1
Comment #16
PA robot CreditAttribution: PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #17
Collins405 CreditAttribution: Collins405 commentedI will fix the code review issues asap, and also the link.